Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bazel] Allow ./bazelisk.sh to use --bazelrc flags
These flags need to come _before_ the subcommand, i.e.: ``` bazel --bazelrc=... cquery # VALID bazel cquery --bazelrc=... # INVALID ``` which is done in this script by pushing flags that come before the subcommand name into an array and re-applying them in the correct order later. If these Bash arrays are confusing and you've come across this commit in a `git blame` then hopefully this will help: 1. Bash supports arrays defined using parentheses: `array=("foo" "bar")` 2. Arrays can't be passed as arguments to functions, they are expanded and get mixed into other arguments, so we use a global instead. 4. the syntax for expanding an array into its elements with correct quoting on each is: `"${array[@]}"`. Signed-off-by: James Wainwright <[email protected]>
- Loading branch information