install.sh: Fix -h handling and error on unrecognized parameters#252
install.sh: Fix -h handling and error on unrecognized parameters#252dlang-bot merged 2 commits intodlang:masterfrom
Conversation
Fix "./install.sh: line 161: $1: unbound variable" when running install.sh with -h or --help. Regression introduced in commit 5793069.
|
Thanks for your pull request, @CyberShadow! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
|
|
||
| *) | ||
| usage | ||
| fatal "Unrecognized command-line parameter: $1" |
There was a problem hiding this comment.
Maybe first showing the error message first?
There was a problem hiding this comment.
No. I intentionally put it after the usage text. You're more likely to notice stuff at the bottom of your terminal window (near the prompt) than near the top.
There was a problem hiding this comment.
Fair enough, I wouldn't have minded anyways
There was a problem hiding this comment.
Indeed, it's weird that most tools do it vice versa.
|
This PR appears to have exposed a bug in the install script. The argument parsing for I found this trying to run the docker-ldc script, which uses the -p option: https://github.com/lindt/docker-ldc/blob/master/Dockerfile#L11 Update: Bugzilla issue: https://issues.dlang.org/show_bug.cgi?id=17858 |
|
Looks like Martin had fixed this by the time you ran into it: 143bbf8 |
|
Was already wondering how that could have been there forever ;). |
|
And thanks for putting the error message at the bottom of the window! |
No description provided.