From ed9a4b098b23e4b76284c8f9f1561dc41090da17 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 4 Nov 2014 14:38:10 +0100 Subject: controller: bash - fail in case of not handled option * bin/dtf-get-machine.in: Exit if option was parsed but was not handled explicitly by case statement. * bin/dtf-run-remote.in: Likewise. --- controller/bin/dtf-get-machine.in | 7 ++++++- controller/bin/dtf-run-remote.in | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'controller') diff --git a/controller/bin/dtf-get-machine.in b/controller/bin/dtf-get-machine.in index 0c51f11..2a668b3 100644 --- a/controller/bin/dtf-get-machine.in +++ b/controller/bin/dtf-get-machine.in @@ -76,7 +76,12 @@ while true; do --) shift - break; + break + ;; + *) + echo >&2 "programmer mistake" + exit 1 + ;; esac done diff --git a/controller/bin/dtf-run-remote.in b/controller/bin/dtf-run-remote.in index 229097f..815f4d3 100644 --- a/controller/bin/dtf-run-remote.in +++ b/controller/bin/dtf-run-remote.in @@ -59,6 +59,12 @@ while true; do shift break ;; + + *) + echo >&2 "programmer mistake" + exit 1 + ;; + esac done -- cgit