mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 05:14:59 +00:00
fix: Update temporary script logging to use f-string and full sys.argv
This commit is contained in:
parent
a8635bade2
commit
85189c0bde
1 changed files with 4 additions and 3 deletions
|
@ -95,9 +95,10 @@ def test_pipe_editor_with_fake_editor():
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as f:
|
with tempfile.NamedTemporaryFile(mode="w", suffix=".py", delete=False) as f:
|
||||||
f.write("""import sys
|
log_path = f.name + ".log"
|
||||||
with open(sys.argv[0] + ".log", "w") as f:
|
f.write(f"""import sys
|
||||||
f.write(" ".join(sys.argv[1:]))
|
with open("{log_path}", "w") as f:
|
||||||
|
f.write(" ".join(sys.argv))
|
||||||
""")
|
""")
|
||||||
script_path = f.name
|
script_path = f.name
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue