From 93fc5feeb2d7fa034d610404755b5d3f9107aec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Rubinstein?= Date: Thu, 25 Dec 2025 13:52:14 +0100 Subject: [PATCH] Handle unset env var checks safely --- update-pr-stack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-pr-stack.sh b/update-pr-stack.sh index 7d48e8f..a08be11 100755 --- a/update-pr-stack.sh +++ b/update-pr-stack.sh @@ -27,7 +27,7 @@ CONFLICT_LABEL="autorestack-needs-conflict-resolution" # Function to check if a required environment variable is set check_env_var() { - if [ -z "${!1}" ]; then + if [[ -z "${!1-}" ]]; then echo "Error: $1 is not set" >&2 exit 1 fi