mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 21:34:59 +00:00
fix: Handle path-specific edits in base_coder.py
test: Update test_main.py to check for explicit approval of shell commands
This commit is contained in:
parent
c7bf46bf68
commit
b2488af638
2 changed files with 4 additions and 1 deletions
|
@ -1737,6 +1737,8 @@ class Coder:
|
||||||
if path is None:
|
if path is None:
|
||||||
res.append(edit)
|
res.append(edit)
|
||||||
continue
|
continue
|
||||||
|
if path == "python":
|
||||||
|
dump(edits)
|
||||||
if path in seen:
|
if path in seen:
|
||||||
allowed = seen[path]
|
allowed = seen[path]
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -597,4 +597,5 @@ class TestMain(TestCase):
|
||||||
output=DummyOutput(),
|
output=DummyOutput(),
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assertTrue(Path("file.txt").exists())
|
# shell commands require explicit approval, not just --yes
|
||||||
|
self.assertFalse(Path("file.txt").exists())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue