From 4605969921437c89bdf65a07ea851483f049d372 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 10 Sep 2024 06:51:38 -0700 Subject: [PATCH] fix: improve PowerShell command execution and output capture on Windows --- aider/run_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/run_cmd.py b/aider/run_cmd.py index b5edc477e..10aa572cb 100644 --- a/aider/run_cmd.py +++ b/aider/run_cmd.py @@ -31,7 +31,7 @@ def run_cmd_subprocess(command, verbose=False): # Use PowerShell if it's the parent process if "powershell" in os.environ.get("PSModulePath", "").lower(): shell = "powershell" - command = f"powershell -Command {command}" + command = f'powershell -ExecutionPolicy Bypass -Command "& {{({command}) | Out-String}}"' else: shell = "cmd" else: