mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
fix: Use run_interactive_command for shell commands
This commit is contained in:
parent
79ffc2405a
commit
bbc619fdba
1 changed files with 7 additions and 4 deletions
|
@ -22,7 +22,8 @@ import git
|
||||||
from rich.console import Console, Text
|
from rich.console import Console, Text
|
||||||
from rich.markdown import Markdown
|
from rich.markdown import Markdown
|
||||||
|
|
||||||
from aider import __version__, models, prompts, urls, utils
|
from aider import __version__, models, prompts, urls
|
||||||
|
from aider import utils
|
||||||
from aider.commands import Commands
|
from aider.commands import Commands
|
||||||
from aider.history import ChatSummary
|
from aider.history import ChatSummary
|
||||||
from aider.io import ConfirmGroup, InputOutput
|
from aider.io import ConfirmGroup, InputOutput
|
||||||
|
@ -1887,6 +1888,8 @@ class Coder:
|
||||||
self.io.tool_output(f"Running {command}")
|
self.io.tool_output(f"Running {command}")
|
||||||
# Add the command to input history
|
# Add the command to input history
|
||||||
self.io.add_to_input_history(f"/run {command.strip()}")
|
self.io.add_to_input_history(f"/run {command.strip()}")
|
||||||
result = self.run_interactive_subprocess(command)
|
exit_status, output = utils.run_interactive_command(command)
|
||||||
if result and result.stdout:
|
if output:
|
||||||
self.io.tool_output(result.stdout)
|
self.io.tool_output(output)
|
||||||
|
if exit_status != 0:
|
||||||
|
self.io.tool_error(f"Command exited with status {exit_status}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue