arcan1s/ahriman

Missing arguments

Closed this issue · 1 comments

Summary

I ran repo-setup according to the documentation.I'm running a bug similar to #34
I found it to be recognized by rearranging the order of the arguments, but this is undocumented anywhere and is a confusing spec.
Also, --no-log cannot be used.

Steps to Reproduce

Run this command

sudo -u ahriman ahriman -a x86_64 --packager "Yamada Hayao <hayao@fascode.net>" --repository alter-stable repo-setup

Logs

> sudo -u ahriman ahriman -a x86_64 --packager "Yamada Hayao <hayao@fascode.net>" --repository alter-stable repo-setup
usage: ahriman [-h] [-a ARCHITECTURE] [-c CONFIGURATION] [--force] [-l LOCK] [--no-report] [-q] [--unsafe] [-v]
               {aur-search,search,key-import,package-add,add,package-update,package-remove,remove,package-status,status,package-status-remove,package-status-update,status-update,patch-add,patch-list,patch-remove,repo-check,check,repo-clean,clean,repo-config,config,repo-init,init,repo-rebuild,rebuild,repo-remove-unknown,remove-unknown,repo-report,report,repo-setup,setup,repo-sign,sign,repo-status-update,repo-sync,sync,repo-update,update,user-add,user-remove,web}
               ...
ahriman: error: argument command: invalid choice: 'Yamada Hayao <hayao@fascode.net>' (choose from 'aur-search', 'search', 'key-import', 'package-add', 'add', 'package-update', 'package-remove', 'remove', 'package-status', 'status', 'package-status-remove', 'package-status-update', 'status-update', 'patch-add', 'patch-list', 'patch-remove', 'repo-check', 'check', 'repo-clean', 'clean', 'repo-config', 'config', 'repo-init', 'init', 'repo-rebuild', 'rebuild', 'repo-remove-unknown', 'remove-unknown', 'repo-report', 'report', 'repo-setup', 'setup', 'repo-sign', 'sign', 'repo-status-update', 'repo-sync', 'sync', 'repo-update', 'update', 'user-add', 'user-remove', 'web')
> sudo -u ahriman ahriman --no-log -a x86_64 repo-setup --packager "Yamada Hayao" --repository alter-stable
usage: ahriman [-h] [-a ARCHITECTURE] [-c CONFIGURATION] [--force] [-l LOCK] [--no-report] [-q] [--unsafe] [-v]
               {aur-search,search,key-import,package-add,add,package-update,package-remove,remove,package-status,status,package-status-remove,package-status-update,status-update,patch-add,patch-list,patch-remove,repo-check,check,repo-clean,clean,repo-config,config,repo-init,init,repo-rebuild,rebuild,repo-remove-unknown,remove-unknown,repo-report,report,repo-setup,setup,repo-sign,sign,repo-status-update,repo-sync,sync,repo-update,update,user-add,user-remove,web}
               ...
ahriman: error: unrecognized arguments: --no-log

--no-log has been replaced by --quiet by 6becd01 (it also changed behavior a bit)

regarding the root cause:

ahriman -a x86_64 repo-setup --packager ...

--packager is an argument of parser repo-setup, looks like library method just parses argument starting with -- and treats next argument as subcommand (which is obviously invalid)