mirror of
https://github.com/github/codeql-action.git
synced 2025-12-26 09:10:07 +08:00
Work around test -v not being available in Mac Bash
This commit is contained in:
5
.github/workflows/__go-reconciled-tracing-custom-build-steps.yml
generated
vendored
5
.github/workflows/__go-reconciled-tracing-custom-build-steps.yml
generated
vendored
@@ -93,7 +93,10 @@ jobs:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user