- Notifications
You must be signed in to change notification settings - Fork145
Open
Labels
Description
Describe the bug
When the agent runs Bazel commands that reference a target in the form //foo/bar:baz, the user is warned that the operation access paths outside allowed directories. This continues even after the user adds the directories to the allowed list.
Affected version
0.0.335 Commit: 48dc015
Steps to reproduce the behavior
- Create a Bazel project with directory structure:
- foo
- bar
- BUILD.bazel
- sh_test(name = "baz")
- BUILD.bazel
- bar
- Ask the agent to run
bazel test //foo/bar:baz
- Observe output:
○ Run the test $ bazel test //foo/bar:baz --test_output=all ↪ 1 line... ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ This operation accesses path(s) outside allowed directories: │ │ //foo/bar:baz. │ │ │ │ Would you like to add these directories to the allowed list? │ │ │ │ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ //foo/bar:baz │ │ │ ╰───────────────────────────────────────────────────────── | │ ❯ 1. Yes │ │ 2. No (Esc) │ │
- Select Yes
- Repeat step 2
- Step 3 repeats
Expected behavior
Either:
- Bazel targets are not interpreted as directories
- Bazel targets are parsed and mapped to actual directories
- After adding a Bazel target as an allowed directory, the choice is respected and the user is not prompted repeatedly to add it to the list of allowed directories.
Additional context
No response