From 0d4377558f8406a7408b80ea6edd0596961a84ec Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Fri, 5 Apr 2024 18:14:15 +0200 Subject: Prevent error message caused by empty variable --- upslak.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upslak.sh') diff --git a/upslak.sh b/upslak.sh index 0a82690..c36071d 100644 --- a/upslak.sh +++ b/upslak.sh @@ -1106,7 +1106,7 @@ if [ -f "${EXTENSION}" ]; then # User already mounted the USB linux partition; remove mountpoint: EXTENSION="${EXTENSION#$EXTMNT}" fi -elif [ "$(dirname ${EXTENSION})" == "." ]; then +elif [ -n "${EXTENSION}" && "$(dirname ${EXTENSION})" == "." ]; then # Containerfile was provided without leading slash, add one: EXTENSION="/${EXTENSION}" fi -- cgit v1.2.3