From bd66b54335d2e9116f047c294f6cf192dd326ae9 Mon Sep 17 00:00:00 2001 From: Hermann Leinweber Date: Thu, 18 Jan 2024 11:47:16 +0100 Subject: [PATCH] chirpotle.sh: Add error message if script parameter is not set or does not exist --- chirpotle.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chirpotle.sh b/chirpotle.sh index 0dd02ea..96ce026 100755 --- a/chirpotle.sh +++ b/chirpotle.sh @@ -916,6 +916,10 @@ function chirpotle_run { esac done # ... all other arguments (if any) are passed to the script as positional args + if [[ ! -e "$SCRIPTNAME" ]]; then + echo "Abort: Script '$SCRIPTNAME' could not be found." + exit 1 + fi while [[ $# -gt 0 ]]; do POSITIONAL+=("$1") shift