Skip to content

Commit

Permalink
Fix integer comparison error by ensuring GITHUB_CI_CD is defined (#170)
Browse files Browse the repository at this point in the history
This commit resolves the error encountered when GITHUB_CI_CD is unset or non-integer by defaulting it to 0.
  • Loading branch information
seuros authored May 1, 2024
1 parent da4f293 commit 79dfd71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ rm md5.txt
tar xvjf "${TARBALL}"
rm "${TARBALL}"

# Ensure GITHUB_CI_CD is set and is an integer, default to 0 if not set
GITHUB_CI_CD="${GITHUB_CI_CD:-0}"

if [ -n "${GITHUB_CI_PR_SHA}" ] || [ 1 -eq "${GITHUB_CI_CD}" ]; then
# This is for GitHub Actions CI/CD tooling only
echo "export PATH=\"${CURDIR}/${TARDIR}/bin\":\"\${PATH}\"" > build.env
Expand All @@ -30,4 +33,3 @@ else
echo "to your ~/.profile and/or ~/.bashrc and run the line to enable toolchain as default one for arm-none-eabi-* target"
echo ""
fi;

0 comments on commit 79dfd71

Please sign in to comment.