diff options
| author | Matt Cooper <mattc@xbox.com> | 2020-03-20 14:53:00 -0400 |
|---|---|---|
| committer | Matt Cooper <mattc@xbox.com> | 2020-03-20 14:53:00 -0400 |
| commit | 6db4bb68d18fa371fd2eac1e97f2e2413315ef5d (patch) | |
| tree | 7812db9135fb7223b9e81290afa17e0f87f6e176 /src/ci/scripts | |
| parent | 330233470e74f76731cc6f702302e9978d363285 (diff) | |
| download | rust-6db4bb68d18fa371fd2eac1e97f2e2413315ef5d.tar.gz rust-6db4bb68d18fa371fd2eac1e97f2e2413315ef5d.zip | |
compat with macOS's ancient Bash
Diffstat (limited to 'src/ci/scripts')
| -rwxr-xr-x | src/ci/scripts/setup-environment.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ci/scripts/setup-environment.sh b/src/ci/scripts/setup-environment.sh index 4f7641d50fa..d134fcd47ba 100755 --- a/src/ci/scripts/setup-environment.sh +++ b/src/ci/scripts/setup-environment.sh @@ -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 |
