Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cliffy should allow to pass option with empty value if option is declared as optional. #731

Open
scandinave opened this issue Aug 27, 2024 · 0 comments

Comments

@scandinave
Copy link

scandinave commented Aug 27, 2024

Hi,
In my use case i have an option defined like this:

  .option('-v, --version <number:semver>',  'The version part of the tag <repo>/<image>:<platform>-<version>-<qualifer>')

This option is called inside a CI pipeline like this:

myCli command --version '${params.RELEASE_VERSION}'

params.RELEASE_VERSION can be a string or empty depending of the user that trigger the pipeline. Currently, Cliffy throw an exception error: Missing value for option "--version". This forces me to due parsing to only add --version if RELEASE_VERSION is not empty.

I expect that an optional option can also be specifying with empty value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant