From 3039080e19cb7a96c7c7ffa8c7c040a9bbc63271 Mon Sep 17 00:00:00 2001 From: Paul Colby Date: Sun, 9 Apr 2023 13:16:25 +1000 Subject: [PATCH] Use `[[` instead of `[` --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 0317de9..d9f9a00 100755 --- a/build.sh +++ b/build.sh @@ -28,7 +28,7 @@ function require { for c in "$@"; do local V="${c//[^[:word:]]/_}" V="$(tr '[:lower:]' '[:upper:]' <<< "$V")" # For macOS's old Bash only. - if [ -v "$V" ]; then continue; fi + if [[ -v "$V" ]]; then continue; fi C=$(command -v "$c") || { echo "Required command not found: $c" >&2; exit 1; } eval "$V"="$C" done