Skip to content

Commit

Permalink
Work around test -v not being available in Mac Bash
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Mercer committed Sep 1, 2022
1 parent 1d311fe commit 6699d47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ steps:
TEST_MODE: true
- shell: bash
run: |
if [[ -v CODEQL_ACTION_DID_AUTOBUILD_GOLANG ]]; then
# Once we start running Bash 4.2 in all environments, we can replace the
# `! -z` flag with the more elegant `-v` which confirms that the variable
# is actually unset and not potentially set to a blank value.
if [[ ! -z "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" ]]; then
echo "Expected the Go autobuilder not to be run, but the" \
"CODEQL_ACTION_DID_AUTOBUILD_GOLANG environment variable was set."
exit 1
Expand Down

0 comments on commit 6699d47

Please sign in to comment.