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

CLI: Add an error for option with invalid value #36

Closed
ee7 opened this issue Oct 10, 2020 · 0 comments · Fixed by #26
Closed

CLI: Add an error for option with invalid value #36

ee7 opened this issue Oct 10, 2020 · 0 comments · Fixed by #26
Labels
kind: bug User-facing incorrect behavior

Comments

@ee7
Copy link
Member

ee7 commented Oct 10, 2020

Examples

canonical_data_syncer --verbosity=quiett
canonical_data_syncer --default=inklude
canonical_data_syncer -d=x

Current behaviour

The program silently ignores the invalid value and operates with the default value.

Expected behaviour

We should show an error like

Error: invalid value for '--verbosity': 'quiett'
Error: invalid value for '--default': 'inklude'
Error: invalid value for '-d': 'x'

And show the help message.

ee7 added a commit to ee7/exercism-configlet that referenced this issue Oct 12, 2020
For example, the command:
  `canonical_data_syncer --verbosity=quiett`

Now produces:
  Error: invalid value for '--verbosity': 'quiett'

And shows the help message.

Previously, the program silently ignored the invalid value, and operated
with the default value.

Fixes: exercism#36
ee7 added a commit to ee7/exercism-configlet that referenced this issue Jan 21, 2021
For example, the command:
  `canonical_data_syncer --verbosity=quiett`

Now produces:
  Error: invalid value for '--verbosity': 'quiett'

And shows the help message.

Previously, the program silently ignored the invalid value, and operated
with the default value.

Fixes: exercism#36
@ee7 ee7 added the kind: bug User-facing incorrect behavior label May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug User-facing incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant