mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 06:44:59 +00:00
fix: Resolve Windows path escaping issue in test_editor.py
This commit is contained in:
parent
3c775fd5de
commit
96fcc5df6b
1 changed files with 3 additions and 1 deletions
|
@ -90,10 +90,12 @@ def test_pipe_editor_with_fake_editor():
|
|||
|
||||
with tempfile.NamedTemporaryFile(mode="w", suffix=".log", delete=False) as log_f:
|
||||
log_path = log_f.name
|
||||
# Convert to raw string path to avoid escape issues on Windows
|
||||
log_path_escaped = log_path.replace("\\", "\\\\")
|
||||
|
||||
with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as f:
|
||||
f.write(f"""import sys
|
||||
with open("{log_path}", "w") as f:
|
||||
with open(r"{log_path_escaped}", "w") as f:
|
||||
f.write(" ".join(sys.argv))
|
||||
""")
|
||||
script_path = f.name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue