Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: Display error when using unkown cli option #1301

Merged
merged 1 commit into from
Apr 8, 2018

Conversation

vasco-santos
Copy link
Member

I believe that the yargs strict was disabled, in order to remove some strange problems regarding fail callbacks, which were inadvertently called. After digging through the yargs validation code, I ended up finding the problem.

The yargs positional arguments validation for positional arguments does not support positional arguments in kebab-case notation (yargs Issue). Therefore, I changed to camelCase those. With this modification and enabling strict generally in the CLI.

And now we have errors for unknown options! 💪😎

Closes 563

@vasco-santos vasco-santos requested a review from daviddias April 6, 2018 17:01
@ghost ghost assigned vasco-santos Apr 6, 2018
@ghost ghost added the status/in-progress In progress label Apr 6, 2018
Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @vasco-santos :)

@daviddias daviddias merged commit a849d2f into master Apr 8, 2018
@daviddias daviddias deleted the fix_display-error-when-using-unknown-cli-option branch April 8, 2018 15:23
@ghost ghost removed the status/in-progress In progress label Apr 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants