From 4d5ab9a88078a645dddaa012c39bec2725b6ef48 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Tue, 27 May 2025 15:23:54 +0200 Subject: [PATCH] execute_shell_command: Use shell=False on Windows --- src/serena/util/shell.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/serena/util/shell.py b/src/serena/util/shell.py index 3d9e66eb..d940384d 100644 --- a/src/serena/util/shell.py +++ b/src/serena/util/shell.py @@ -1,4 +1,5 @@ import os +import platform import subprocess from pydantic import BaseModel @@ -25,7 +26,7 @@ def execute_shell_command(command: str, cwd: str | None = None, capture_stderr: process = subprocess.Popen( command, - shell=True, + shell=platform.system() != "Windows", stdout=subprocess.PIPE, stderr=subprocess.PIPE if capture_stderr else None, text=True,