laminas / laminas-cli

Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications
https://docs.laminas.dev/laminas-cli
BSD 3-Clause "New" or "Revised" License
55 stars 22 forks source link

bugfix: ignore validation of `ArgvInput` #76

Closed boesing closed 3 years ago

boesing commented 3 years ago
Q A
Bugfix yes

Description

Ignores the validation of ArgvInput while detecting the --container option.

Caveat

This will only work if the --container option is being passed before the commands name or right after the command name.

If the command has arguments, the --container option must be preceding the commands very first argument.

OK

$ laminas --container=<path> <command> [<argument>]
$ laminas <command> --container=<path> [<argument>]

NOK

$ laminas <command> <argument> --container=<path> 

fixes #74

boesing commented 3 years ago

75 would always detect the --container option, no matter where it is positioned. But it is indeed way more complex than this.