From 10898c1b20429ea1dc3eb0d828c401bd3176563b Mon Sep 17 00:00:00 2001 From: Joey Hafner Date: Tue, 10 Oct 2023 14:24:09 -0700 Subject: [PATCH] Add error handling for subcommands --- fighter/scripts/docker-stacks.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fighter/scripts/docker-stacks.sh b/fighter/scripts/docker-stacks.sh index 6948997..4c0163b 100644 --- a/fighter/scripts/docker-stacks.sh +++ b/fighter/scripts/docker-stacks.sh @@ -63,6 +63,7 @@ function main { while [[ $# -gt 0 ]]; do case $1 in -f|--force-recreate) FORCE_RECREATE=true; shift;; + *) echo "Unrecognized option '$1'"; exit 1;; esac done ;; @@ -70,6 +71,7 @@ function main { while [[ $# -gt 0 ]]; do case $1 in -o|--remove-orphans) REMOVE_ORPHANS=true; shift;; + *) echo "Unrecognized option '$1'"; exit 1;; esac done ;;