From a87e2e6ba4888c0eadc59de21e67e12b1d08b4e4 Mon Sep 17 00:00:00 2001 From: "Jason B. Cox" Date: Fri, 6 Mar 2026 09:50:43 -0800 Subject: [PATCH] Use the configured shell when tool command is called --- cecli/tools/command.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cecli/tools/command.py b/cecli/tools/command.py index 7b8826ce031..8ef37d3367d 100644 --- a/cecli/tools/command.py +++ b/cecli/tools/command.py @@ -1,4 +1,7 @@ # Import necessary functions +import os +import platform + from cecli.helpers.background_commands import BackgroundCommandManager from cecli.run_cmd import run_cmd_subprocess from cecli.tools.utils.base_tool import BaseTool @@ -121,6 +124,8 @@ async def _execute_with_timeout(cls, coder, command_string, timeout): coder.io.tool_output(f"⚙️ Executing shell command with {timeout}s timeout: {command_string}") + shell = os.environ.get("SHELL", "/bin/sh") + # Create output buffer buffer = CircularBuffer(max_size=4096) @@ -128,6 +133,7 @@ async def _execute_with_timeout(cls, coder, command_string, timeout): process = subprocess.Popen( command_string, shell=True, + executable=shell if platform.system() != "Windows" else None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.DEVNULL,