From 9154ba5b8505797688ab1a399f985caaa60fc4d9 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 27 Jun 2024 02:38:22 +0100 Subject: 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 66cc76ef..ccd45d19 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)" -- cgit v1.2.1