Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cecli/tools/command.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -121,13 +124,16 @@ 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)

# Start process with pipes for output capture
process = subprocess.Popen(
command_string,
shell=True,
executable=shell if platform.system() != "Windows" else None,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdin=subprocess.DEVNULL,
Expand Down