Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a41f04c

Browse files
committed
remove variable name substitution
1 parent d7efe95 commit a41f04c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/prepmsg.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ set -ex
44

55
[ $# -ne 2 ] && ( echo "Expected 1 input and 1 output files, got $#"; exit; )
66
[ ! -f $1 ] && ( echo "Input file $1 not found, skipping."; exit; )
7-
for var in GITHUB_REPOSITORY GITHUB_RUN_NUMBER GITHUB_JOB; do
8-
[ -z ${!var} ] && ( echo "${!var} is empty."; exit 1; )
9-
done
7+
[ -z "${GITHUB_REPOSITORY}" ] && (echo "GITHUB_REPOSITORY is empty."; exit 1;)
8+
[ -z "${GITHUB_RUN_NUMBER}" ] && (echo "GITHUB_RUN_NUMBER is empty."; exit 1;)
9+
[ -z "${GITHUB_JOB}" ] && (echo "GITHUB_JOB is empty."; exit 1;)
1010

1111
URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_NUMBER}"
1212
echo "❌ *${GITHUB_JOB}* ([ID *${GITHUB_RUN_NUMBER}*]($URL)):" > $2

0 commit comments

Comments
 (0)