Skip to content

Commit

Permalink
compat with macOS's ancient Bash
Browse files Browse the repository at this point in the history
  • Loading branch information
vtbassmatt committed Mar 20, 2020
1 parent 3302334 commit 6db4bb6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ci/scripts/setup-environment.sh
Expand Up @@ -11,8 +11,14 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
# Since matrix variables are readonly in Azure Pipelines, we take
# INITIAL_RUST_CONFIGURE_ARGS and establish RUST_CONFIGURE_ARGS
# which downstream steps can alter
if [[ -v INITIAL_RUST_CONFIGURE_ARGS ]]; then
ciCommandSetEnv RUST_CONFIGURE_ARGS "${INITIAL_RUST_CONFIGURE_ARGS}"
# macOS ships with Bash 3.16, so we cannot use [[ -v FOO ]],
# which was introduced in Bash 4.2
if [[ -z "${INITIAL_RUST_CONFIGURE_ARGS+x}" ]]; then
INITIAL_RUST_CONFIG=""
echo "No initial Rust configure args set"
else
INITIAL_RUST_CONFIG="${INITIAL_RUST_CONFIGURE_ARGS}"
ciCommandSetEnv RUST_CONFIGURE_ARGS "${INITIAL_RUST_CONFIG}"
fi

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

0 comments on commit 6db4bb6

Please sign in to comment.