bugsnag / bugsnag-source-maps

CLI and JS library for uploading source maps to BugSnag
MIT License
16 stars 9 forks source link

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

Closed imjoehaines closed 3 years ago

imjoehaines commented 3 years ago

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

imjoehaines commented 3 years ago

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"