This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
should not be allowed flags for subcommand before the subcommand itself on the command line #167
Labels
bug
Something isn't working
Currently, the behavior of the
buffalo
CLI allows putting flags for the subcommand before the subcommand itself, and as a result, they are sometimes interpreted in unexpected ways:For example,
buffalo pop reset -e test
is the proper way to run the subcommandpop
with argumentsreset -e test
. The current version of thebuffalo
command also allows running the same job with the command linebuffalo -e test pop reset
, and in this case, the subcommand and arguments for the subcommand are interpreted as the same as the desired command line above. However, if the command line is changed slightly, e.g.buffalo -d -e test pop reset
, the command line is interpreted as subcommandtest
with the argument for the subcommand-d -e pop reset
buffalo pop reset -e test
- standard usage: aspop
with argsreset -e test
buffalo -e test pop reset
- allowed currently: aspop
with args-e test reset
buffalo -e test pop reset -d
- also works fine: aspop
with args-e test reset -d
buffalo -d -e test pop reset
- does not work: becometest
with args-d -e pop reset
buffalo -e test -d pop reset
- does not work: becomereset
with args-e test -d pop
To make it clear, the command line should be a form of:
and we should not allow mixed positions. (by the way, currently, there is no global flag except autogenerated
--help
.)The text was updated successfully, but these errors were encountered: