Skip to content
This repository was archived by the owner on Aug 4, 2022. It is now read-only.

Commit 40d399e

Browse files
authored
Use array expansion to add extra bazel args to the bazel invocation. (#17)
* Use array expansion to add extra bazel args to the bazel invocation. This is necessary for cases when arguments are passed that involve quotation, such as "--ios_simulator_device=iPad Pro (12.9-inch)". If we store the extra args as a string, then when we expand it in the bazel invocation the string will be parsed as a string literal or as a whitespace-delimited array of arguments, which can cause the original argument quotations to be lost or changed. By expanding the arguments as an array, we honor the original quotations of the arguments. * Remove bazel args variable.
1 parent b4f3ada commit 40d399e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bazel.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ fi
9090

9191
ACTION="$1"
9292
TARGET="$2"
93-
BAZEL_ARGS="${@:3}"
9493

9594
# Runs our tests on every available Xcode installation.
9695
ls /Applications/ | grep "Xcode" | while read -r xcode_path; do
@@ -130,5 +129,5 @@ ls /Applications/ | grep "Xcode" | while read -r xcode_path; do
130129
fi
131130

132131
bazel clean
133-
bazel $ACTION $TARGET --xcode_version $xcode_version $extra_args $verbosity_flags $BAZEL_ARGS
132+
bazel $ACTION $TARGET --xcode_version $xcode_version $extra_args $verbosity_flags "${POSITIONAL[@]:2}"
134133
done

0 commit comments

Comments
 (0)