From 0415de853bd3d768727c7f9806e9eeeedc780464 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 24 Feb 2025 09:22:28 -0800 Subject: [PATCH] fix: Remove shell=True and add debug dump in pipe_editor --- aider/editor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aider/editor.py b/aider/editor.py index c679db80c..f19b2fe16 100644 --- a/aider/editor.py +++ b/aider/editor.py @@ -13,6 +13,7 @@ import platform import shlex import subprocess import tempfile +from aider.dump import dump 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) command_parts = discover_editor(editor) 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: output_data = f.read() try: