Skip to content

Commit 6699d47

Browse files
committed
Work around test -v not being available in Mac Bash
1 parent 1d311fe commit 6699d47

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/__go-reconciled-tracing-custom-build-steps.yml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/go-reconciled-tracing-custom-build-steps.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ steps:
2121
TEST_MODE: true
2222
- shell: bash
2323
run: |
24-
if [[ -v CODEQL_ACTION_DID_AUTOBUILD_GOLANG ]]; then
24+
# Once we start running Bash 4.2 in all environments, we can replace the
25+
# `! -z` flag with the more elegant `-v` which confirms that the variable
26+
# is actually unset and not potentially set to a blank value.
27+
if [[ ! -z "${CODEQL_ACTION_DID_AUTOBUILD_GOLANG}" ]]; then
2528
echo "Expected the Go autobuilder not to be run, but the" \
2629
"CODEQL_ACTION_DID_AUTOBUILD_GOLANG environment variable was set."
2730
exit 1

0 commit comments

Comments
 (0)