You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--help after the command treats --help as positional argument #982
I've read through #205 and from what I understand this is not expected, --help and other core flags should be parsed out before task execution from what I understand.
Are there any suggested workarounds? Or is this unavoidable when the task takes positional arguments?
I can fix it. but I don't like invoke --help taskname, why not just invoke taskname --help. It's more *nix style, which is default case in most scenarios.
This used to work (99% certainty) but has been broken for quite some time. It definitely should work! I have to take a look at the gnarly old guts of the parser to see why it's broken and how it can be fixed.
It will probably come down to a judgement call - if a token could be either a positional value or a flag, we will assume it's a flag, because that is obviously the more common/likely case.
(Suppose we could afterwards add an argument to @task for folks who very badly want to override that behavior to how it currently behaves, but, eh.)
Activity
cupen commentedon Apr 26, 2024
I can fix it. but I don't like
invoke --help taskname, why not justinvoke taskname --help. It's more *nix style, which is default case in most scenarios.tonygoldman commentedon May 15, 2024
Agreed!
invoke taskname --helpshould be the standard.bitprophet commentedon Oct 18, 2024
This used to work (99% certainty) but has been broken for quite some time. It definitely should work! I have to take a look at the gnarly old guts of the parser to see why it's broken and how it can be fixed.
It will probably come down to a judgement call - if a token could be either a positional value or a flag, we will assume it's a flag, because that is obviously the more common/likely case.
(Suppose we could afterwards add an argument to
@taskfor folks who very badly want to override that behavior to how it currently behaves, but, eh.)Fix --help consumed as positional arg value (pyinvoke#982)