deno-cliffy icon indicating copy to clipboard operation
deno-cliffy copied to clipboard

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

Open scandinave opened this issue 5 months ago • 0 comments

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.

scandinave avatar Aug 27 '24 07:08 scandinave