From e3179f435ef5699bf5853ccfc83390adc6e1659e Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 27 Jun 2024 02:38:22 +0100 Subject: [PATCH] trees: explicitly err if OPTARG is not set we currently rely on -e to make this happen Signed-off-by: Leah Rowe --- script/trees | 1 + 1 file changed, 1 insertion(+) diff --git a/script/trees b/script/trees index e9c2b3b..c29c3fc 100755 --- a/script/trees +++ b/script/trees @@ -31,6 +31,7 @@ main() -n) mode="nconfig" ;; *) $err "invalid option '-$option'" ;; esac + [ -n "${OPTARG+x}" ] || $err "OPTARG not set" project="${OPTARG#src/}"; shift 2 done [ -z "$_f" ] && $err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)"