explitly set --output=label when calling bazel query.
When using BLAZE_COMPLETION_USE_QUERY=true and if users changed the default in
their bazelrc to have a different output (eg. --output=build), the bazel query
output won't be in the correct format and completion doesn't work.
@@ -210,7 +210,7 @@ _bazel__expand_rules_in_package() {
if _bazel_completion_use_query; then
package_name=$(echo "$package_name" | tr -d "'\"") # remove quotes
result=$(${BAZEL} --output_base=/tmp/${BAZEL}-completion-$USER query \
- --keep_going --noshow_progress \
+ --keep_going --noshow_progress --output=label \
"kind('$pattern rule', '$package_name:*')" 2>/dev/null |
cut -f2 -d: | "grep" "^$rule_prefix")
else
