From 53be0527e2c9285476a27331ad1851819e849c45 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Wed, 31 Aug 2022 02:13:00 +0200 Subject: fix: properly check for invalid argument in checkpkg and diffpkg The option switch case only matches by splitting via '|' instead of ',' --- src/checkpkg.in | 2 +- src/diffpkg.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/checkpkg.in b/src/checkpkg.in index da4c67b..1a7983c 100644 --- a/src/checkpkg.in +++ b/src/checkpkg.in @@ -52,7 +52,7 @@ while (( $# )); do shift break ;; - -*,--*) + -*|--*) die "invalid argument: %s" "$1" ;; *) diff --git a/src/diffpkg.in b/src/diffpkg.in index 5bae805..b964d44 100644 --- a/src/diffpkg.in +++ b/src/diffpkg.in @@ -129,7 +129,7 @@ while (( $# )); do shift break ;; - -*,--*) + -*|--*) die "invalid argument: %s" "$1" ;; *) -- cgit v1.2.3-70-g09d2