Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: bazel --query_file goes to interactive #602

Open
justhecuke opened this issue Jan 13, 2024 · 1 comment
Open

[Bug]: bazel --query_file goes to interactive #602

justhecuke opened this issue Jan 13, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@justhecuke
Copy link

What happened?

$ bazel --version
aspect 5.8.20

$ echo '//:all' > queryfile.txt
$ bazel query --query_file queryfile.txt

Results in an interactive prompt:

Use the arrow keys to navigate: ↓ ↑ → ← 
? Select a preset query: 
  ▸ why: Determine why targetA depends on targetB
    deps: Get the deps of a target

This should not happen. The query should execute what is in the query_file and not start an interactive prompt.

Version

Development (host) and target OS/architectures:
22.04.1-Ubuntu SMP Fri Nov 17 21:07:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Output of bazel --version:
aspect 5.8.20

Our .bazelversion is 6.4.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
N/A

Language(s) and/or frameworks involved:
N/A

How to reproduce

echo '//:all' > queryfile.txt
bazel query --query_file queryfile.txt

Any other information?

No response

@justhecuke justhecuke added the bug Something isn't working label Jan 13, 2024
@github-actions github-actions bot added the untriaged Requires traige label Jan 13, 2024
@alexeagle alexeagle removed the untriaged Requires traige label Mar 27, 2024
@mattem mattem removed their assignment Mar 27, 2024
@alexeagle alexeagle self-assigned this May 6, 2024
@gregmagolan
Copy link
Member

Calling

bazel query --aspect:interactive=false --query_file queryfile.txt

should work-around the issue.

We should fix this in the CLI, however, to not go into interactive mode if the user specifies a --query_file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

4 participants