Skip to content

Commit 67c5b6d

Browse files
fix: correct environment variable access in check script
1 parent 5cf0c9c commit 67c5b6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/scripts/check-required-config.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ MISSING_SECRETS=()
1313
for arg in "$@"; do
1414
if [[ "$arg" =~ ^v:(.+)$ ]]; then
1515
VAR_NAME="${BASH_REMATCH[1]}"
16-
VAR_VALUE="${!VAR_NAME}"
16+
# Get value from environment variable
17+
VAR_VALUE=$(eval echo \$$VAR_NAME)
1718

1819
if [ -z "$VAR_VALUE" ]; then
1920
MISSING_VARS+=("$VAR_NAME")
2021
fi
2122
elif [[ "$arg" =~ ^s:(.+)$ ]]; then
2223
SECRET_NAME="${BASH_REMATCH[1]}"
23-
SECRET_VALUE="${!SECRET_NAME}"
24+
# Get value from environment variable
25+
SECRET_VALUE=$(eval echo \$$SECRET_NAME)
2426

2527
if [ -z "$SECRET_VALUE" ] || [ "$SECRET_VALUE" = "" ]; then
2628
MISSING_SECRETS+=("$SECRET_NAME")

0 commit comments

Comments
 (0)