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

Add extra info when a value with a wildcard might not be in quotes #33

Merged
merged 2 commits into from
Dec 4, 2020

Conversation

imjoehaines
Copy link
Member

Goal

This PR adds an info message when an argument that allows a wildcard is used and we encounter an unknown value error. For example, the following command will cause an unknown value error because --base-url has two arguments:

$ ./bin/cli upload-browser --base-url 123 xyz

If a user is using a wildcard argument and we get an unknown value, it's likely that this is because the wildcard isn't wrapped in quotes — i.e. --base-url * should be --base-url "*"

This is hard to know for sure because asterisk expansion happens in the shell before the CLI is run, so we have to guess that this happened

Copy link
Contributor

@bengourley bengourley left a comment

Choose a reason for hiding this comment

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

Suggestion added to make it clear "why", though it may just confuse matters. Take it or leave it!

src/commands/UploadBrowserCommand.ts Outdated Show resolved Hide resolved
@imjoehaines
Copy link
Member Author

Suggestion added to make it clear "why", though it may just confuse matters. Take it or leave it!

Yeah this makes a lot of sense — it's google-able if someone isn't familiar with "shell expansion"

@imjoehaines imjoehaines merged commit e412588 into next Dec 4, 2020
@imjoehaines imjoehaines deleted the warn-about-wildcards branch December 4, 2020 17:44
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

Successfully merging this pull request may close these issues.

None yet

2 participants