Skip to content

Commit 6db4bb6

Browse files
committed
compat with macOS's ancient Bash
1 parent 3302334 commit 6db4bb6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/ci/scripts/setup-environment.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
1111
# Since matrix variables are readonly in Azure Pipelines, we take
1212
# INITIAL_RUST_CONFIGURE_ARGS and establish RUST_CONFIGURE_ARGS
1313
# which downstream steps can alter
14-
if [[ -v INITIAL_RUST_CONFIGURE_ARGS ]]; then
15-
ciCommandSetEnv RUST_CONFIGURE_ARGS "${INITIAL_RUST_CONFIGURE_ARGS}"
14+
# macOS ships with Bash 3.16, so we cannot use [[ -v FOO ]],
15+
# which was introduced in Bash 4.2
16+
if [[ -z "${INITIAL_RUST_CONFIGURE_ARGS+x}" ]]; then
17+
INITIAL_RUST_CONFIG=""
18+
echo "No initial Rust configure args set"
19+
else
20+
INITIAL_RUST_CONFIG="${INITIAL_RUST_CONFIGURE_ARGS}"
21+
ciCommandSetEnv RUST_CONFIGURE_ARGS "${INITIAL_RUST_CONFIG}"
1622
fi
1723

1824
# Builders starting with `dist-` are dist builders, but if they also end with

0 commit comments

Comments
 (0)