aurelienbrabant
aurelienbrabant17mo ago

[CLI] --debug conflicts with --data in short option form for wmill flow run

wmill flow run some_flow -d '{ "someId": "f14661818ab7a5cf917ff1c17a663de" }'
Debug logging enabled. CLI build against v1.138.0

Usage: wmill flow run <path>
Version: v1.138.0

Description:

run a flow by path.

Options:

-h, --help - Show this help.
--workspace <workspace> - Specify the target workspace. This overrides the default workspace.
-d, --debug - Show debug logs
--show-diffs - Show diff informations when syncing (may show sensitive informations)
--token <token> - Specify an API token. This will override any stored token.
-d, --data <data> - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
-s, --silent - Do not ouput anything other then the final output. Useful for scripting.

error: Too many arguments: { "someId": "f14661818ab7a5cf917eff1c17a663de" }
wmill flow run some_flow -d '{ "someId": "f14661818ab7a5cf917ff1c17a663de" }'
Debug logging enabled. CLI build against v1.138.0

Usage: wmill flow run <path>
Version: v1.138.0

Description:

run a flow by path.

Options:

-h, --help - Show this help.
--workspace <workspace> - Specify the target workspace. This overrides the default workspace.
-d, --debug - Show debug logs
--show-diffs - Show diff informations when syncing (may show sensitive informations)
--token <token> - Specify an API token. This will override any stored token.
-d, --data <data> - Inputs specified as a JSON string or a file using @<filename> or stdin using @-.
-s, --silent - Do not ouput anything other then the final output. Useful for scripting.

error: Too many arguments: { "someId": "f14661818ab7a5cf917eff1c17a663de" }
According to the displayed help -d maps to both --debug and --data options but practically only applies debug. Should it help output of wmill version is
CLI build against v1.138.0
Cannot resolve Backend Version
CLI build against v1.138.0
Cannot resolve Backend Version
9 Replies
rubenf
rubenf17mo ago
Are you sure it doesn't do both ? I think I will change -d, --debug for verbose
aurelienbrabant
aurelienbrabantOP17mo ago
As showed it fails with the following message
error: Too many arguments: { "someId": "f14661818ab7a5cf917eff1c17a663de" }
error: Too many arguments: { "someId": "f14661818ab7a5cf917eff1c17a663de" }
rubenf
rubenf17mo ago
👍 on it
aurelienbrabant
aurelienbrabantOP17mo ago
I'm fine with it being --verbose
rubenf
rubenf17mo ago
problem is we already use -v for version
aurelienbrabant
aurelienbrabantOP17mo ago
Oh
rubenf
rubenf17mo ago
shortcuts are hard 😄 other possibility is to remove -d shortcut for debug
aurelienbrabant
aurelienbrabantOP17mo ago
Now that you mention it I think I have seen some options that don't have a shorter counterpart on some CLI tools, might be the reason I'd use long versions for actual production scripts anyway so I'm also fine with that, I was just testing things out with that -d thing
rubenf
rubenf17mo ago
on latest, it's --verbose and --debug so there is no more collision will do a release soon