mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-06 04:35:00 +00:00
fix: Remove shell=True and add debug dump in pipe_editor
This commit is contained in:
parent
0ba1e8f904
commit
0415de853b
1 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,7 @@ import platform
|
||||||
import shlex
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
from aider.dump import dump
|
||||||
|
|
||||||
from rich.console import Console
|
from rich.console import Console
|
||||||
|
|
||||||
|
@ -130,7 +131,8 @@ def pipe_editor(input_data="", suffix=None, editor=None):
|
||||||
filepath = write_temp_file(input_data, suffix)
|
filepath = write_temp_file(input_data, suffix)
|
||||||
command_parts = discover_editor(editor)
|
command_parts = discover_editor(editor)
|
||||||
command_parts.append(filepath)
|
command_parts.append(filepath)
|
||||||
subprocess.call(command_parts, shell=True)
|
dump(command_parts)
|
||||||
|
subprocess.call(command_parts) # why does adding shell=True launch the editor without the filepath? ai?
|
||||||
with open(filepath, "r") as f:
|
with open(filepath, "r") as f:
|
||||||
output_data = f.read()
|
output_data = f.read()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue