From 17107adbcaa6d637041148dc5c4172bfb705ee01 Mon Sep 17 00:00:00 2001 From: jbu Date: Sat, 20 Jun 2015 10:08:44 +0200 Subject: [PATCH] vopt_enable: check for excess parameters --- common/environment/setup/options.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/environment/setup/options.sh b/common/environment/setup/options.sh index 1f69c7f37b..72a89a2e08 100644 --- a/common/environment/setup/options.sh +++ b/common/environment/setup/options.sh @@ -16,6 +16,9 @@ vopt_with() { vopt_enable() { local opt="$1" flag="${2:-$1}" + if [ "$#" -gt "2" ]; then + msg_error "vopt_enable $opt: $(($# - 2)) excess parameter(s)\n" + fi vopt_if "$1" "--enable-${flag}" "--disable-${flag}" }