This PR fixes a bug related to the passing of top-level CLI options into binstar_main.
Specifically, when running commands like:
anaconda --token TOKEN whoami
anaconda --token TOKEN org whoami
Since we would like both of those commands to be handled by binstar_main, while allowing the top-level entrypoint to be handled by anaconda-cli-base, we need some special handling of the top-level options (--token, --site, etc.).
For now, we just simply pass through sys.argv (with the optional org subcommand removed). This allows us to have completely backwards-compatible behavior. When we replace subcommands with click/typer-based alternatives, we can pass through these top-level options via the context (ctx) object, but for now this solution should be sufficient.
This PR fixes a bug related to the passing of top-level CLI options into
binstar_main
.Specifically, when running commands like:
anaconda --token TOKEN whoami
anaconda --token TOKEN org whoami
Since we would like both of those commands to be handled by
binstar_main
, while allowing the top-level entrypoint to be handled byanaconda-cli-base
, we need some special handling of the top-level options (--token
,--site
, etc.).For now, we just simply pass through
sys.argv
(with the optionalorg
subcommand removed). This allows us to have completely backwards-compatible behavior. When we replace subcommands with click/typer-based alternatives, we can pass through these top-level options via the context (ctx
) object, but for now this solution should be sufficient.