From 0ba3fc3c2ff6389d4f6569f98378adb09536610b Mon Sep 17 00:00:00 2001 From: Greg Price Date: Wed, 24 Jan 2018 13:23:47 -0800 Subject: [PATCH] install: Slightly tighten up CLI parsing. This causes us to give an error if you pass the installer any positional arguments, e.g. with `--`. There's no reason you'd want to do this, but I accidentally did it by passing an extra `--` to the `test-install/install` wrapper and spent a few minutes on confused debugging. --- scripts/lib/install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/lib/install b/scripts/lib/install index 400bc33004..7d0faa9c4f 100755 --- a/scripts/lib/install +++ b/scripts/lib/install @@ -43,11 +43,16 @@ while true; do shift ;; --) + shift break ;; esac done +if [ "$#" -gt 0 ]; then + usage +fi + if [ -n "$show_help" ]; then usage fi