aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/bootstrap
diff options
context:
space:
mode:
authorGravatar Yun Peng <pcloudy@google.com>2017-03-09 13:15:41 +0000
committerGravatar Vladimir Moskva <vladmos@google.com>2017-03-09 16:27:28 +0000
commit8efd282a652b3b55411a0e02c227c52ae72a087e (patch)
tree9af38f8656988a42c85d91da454c867fc1aaea93 /scripts/bootstrap
parent747c216887d35ce1e89ab0b0983088f8af90e8aa (diff)
Fix bazel_bootstrap_distfile_test on Windows
Spaces might appear in env values, adding quote around it. -- PiperOrigin-RevId: 149642783 MOS_MIGRATED_REVID=149642783
Diffstat (limited to 'scripts/bootstrap')
-rwxr-xr-xscripts/bootstrap/compile.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
index ab2bb22719..294b154b83 100755
--- a/scripts/bootstrap/compile.sh
+++ b/scripts/bootstrap/compile.sh
@@ -316,12 +316,12 @@ fi
function run_bazel_jar() {
local command=$1
shift
- local client_env=""
+ local client_env=()
# Propagate important environment variables to bootstrapped Bazel.
- for varname in PATH CC BAZEL_VC BAZEL_VS BAZEL_PYTHON CPLUS_INCLUDEPATH; do
+ for varname in PATH CC BAZEL_SH BAZEL_VC BAZEL_VS BAZEL_PYTHON CPLUS_INCLUDEPATH; do
eval value=\$$varname
- if [ ${value} ]; then
- client_env="${client_env} --client_env=${varname}=${value}"
+ if [ "${value}" ]; then
+ client_env=("${client_env[@]}" --client_env="${varname}=${value}")
fi
done
@@ -343,7 +343,7 @@ function run_bazel_jar() {
--ignore_unsupported_sandboxing \
--startup_time=329 --extract_data_time=523 \
--rc_source=/dev/null --isatty=1 \
- ${client_env} \
+ "${client_env[@]}" \
--client_cwd=${PWD} \
"${@}"
}