nategood / commando

An Elegant CLI Library for PHP
MIT License
798 stars 80 forks source link

Help doesn't short circuit #77

Closed agmckee closed 3 years ago

agmckee commented 7 years ago

Probably related to #75, the --help option doesn't short circuit unless you're accessing an option via the array access interface.

NeoVance commented 7 years ago

As stated in #75 the options don't have their values set until the argument tokens are parsed. The parse function is not run until the array access is used for the first time.

Because of this, validation of the arguments will not occur until you access the options through the array accessor, or you manually call the parse function.