From d4685900dd1039b898c14d1644a93c2ac6739a47 Mon Sep 17 00:00:00 2001 From: gliargovas Date: Wed, 15 Nov 2023 02:11:10 -0500 Subject: [PATCH] Add check for specifying -L multiple times --- try | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/try b/try index b4c444ad..565303fb 100755 --- a/try +++ b/try @@ -546,7 +546,11 @@ do fi SANDBOX_DIR="$OPTARG" NO_COMMIT="quiet";; - (L) LOWER_DIRS="$OPTARG" + (L) if [ -n "$LOWER_DIRS" ]; then + error "the -L option has been specified multiple times." 2 + exit 1 + fi + LOWER_DIRS="$OPTARG" NO_COMMIT="quiet";; (v) echo "$TRY_COMMAND version $TRY_VERSION" >&2 exit 0;;