From b41456d48c62b88118f2a7c5ef748db2c2853f63 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 29 Oct 2025 23:43:37 +0100 Subject: [PATCH] src/bin/grepc: Add defensive check This is safer than silencing shellcheck(1). Signed-off-by: Alejandro Colomar --- src/bin/grepc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/grepc b/src/bin/grepc index 4f92c8638..f0efba36e 100755 --- a/src/bin/grepc +++ b/src/bin/grepc @@ -68,7 +68,6 @@ while getopts "A:B:C:chilm:nrt:x:" opt; do x='c'; fi; - # shellcheck disable=SC2249 # Already validated under x). case "$x" in c) case "$OPTARG" in @@ -114,6 +113,9 @@ while getopts "A:B:C:chilm:nrt:x:" opt; do ;; esac; ;; + *) # Unreachable; already validated under x). + exit 2; + ;; esac; ;; x) -- 2.47.3