Ensure ci script fails properly with invalid parameters

Prevent the ci script from going to infinite loop if the user provides a
non POSIX style command line argument (not prefixed with - or --)

Original commit: elastic/x-pack-elasticsearch@e0eb0e6df7
This commit is contained in:
Dimitrios Liappis 2016-11-21 17:18:48 +02:00
parent d19c13d2b5
commit 46055d0430
1 changed files with 1 additions and 4 deletions

View File

@ -25,12 +25,9 @@ case $key in
echo -e "Syntax:\n"
echo -e "$0 [-g|--gradleoptstring] \"override gradle parameters for tests\"\n"
exit 0;;
-*)
*)
echo "Unknown argument: $key";
exit 1;;
*)
# Unknown option
;;
esac
done