Ability to specify command args for bazel query
daivinhtran opened this issue · 2 comments
bazel.commandLine.commandArgs
is only passed into bazel test
and bazel build
commands, not bazel query
.
I have a scenario where I need to use --config
or --package_path
at the end of the command bazel query
.
Can we add a configurable field to pass in args to bazel query
? Currently, we have startupOptions
which results to bazel [startupOptions] query
. However, there isn't a way to have bazel query [additionalArgs]
.
Would it be an option for you to define your query
command line arguments in your .bazelrc
file like so:
query --package_path=...
What would be cool though, I think, is if this extension offered some UI element to select configuration aliases per Bazel command from the ones available in your .bazelrc
file.
Would it be an option for you to define your query command line arguments
Yes
What would be cool though, I think, is if this extension offered some UI element to select configuration aliases per Bazel command from the ones available in your .bazelrc file.
I'm not sure how feasible this is. Usually the configs are driven by the set of configs and their default values statically written in the package.json file. The .bazelrc
is not static and dependent on specific repos.
However, it would be nice to be able to specify --config=<alias>
somewhere in the configs window.