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
If you have a global option, with a default value, that value does not appear in the options object inside an action. However it does appear on the --help page.
Actual behavior
Here is the output from the example above:
~$ play order one
{"args":{"pizzaType":"one"},"options":{}}
Ordering pizza one
And the help, which shows the default value.
~$ play --help
Caporal Playground 1.0.0 — Dynamicaly generated playground program
USAGE
▸ play <command> [ARGUMENTS...] [OPTIONS...]
COMMANDS — Type 'play help <command>' to get some help about a command
order Order command
GLOBAL OPTIONS
-h, --help Display global help or command-related help.
-V, --version Display version.
--no-color Disable use of colors in output.
-v, --verbose Verbose mode: will also output debug messages.
--quiet Quiet mode - only displays warn and error messages.
--silent Silent mode: does not output anything, giving no
indication of success or failure other than the exit
code.
--foo <baz> a global option
default: "bar"
Environment information (please complete the following information):
OS: Mac and in the ground
OS version: 10.15.7
Shell: zsh
Caporal version: 2.0.2
The text was updated successfully, but these errors were encountered:
If you have a global option, with a default value, that value does not appear in the
options
object inside an action. However it does appear on the--help
page.Here is a playground example:
Expected behavior
The global options with default values should appear in the action
options
object.I'd expect:
{"args":{"pizzaType":"one"},"options":{"baz": "bar"}}
Actual behavior
Here is the output from the example above:
And the help, which shows the default value.
Environment information (please complete the following information):
The text was updated successfully, but these errors were encountered: