mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
fix: Combine stdout and stderr, output directly without additional messages
This commit is contained in:
parent
8d0c2b1667
commit
359e4129c6
1 changed files with 3 additions and 8 deletions
|
@ -40,19 +40,14 @@ class EditBlockCoder(Coder):
|
||||||
if self.io.confirm_ask("Do you want to run this suggested shell command?"):
|
if self.io.confirm_ask("Do you want to run this suggested shell command?"):
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
edit, shell=True, check=True, text=True, capture_output=True
|
edit, shell=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
|
||||||
)
|
)
|
||||||
self.io.tool_output(
|
self.io.tool_output(result.stdout)
|
||||||
f"Command executed successfully. Output:\n{result.stdout}"
|
|
||||||
)
|
|
||||||
if result.stderr:
|
|
||||||
self.io.tool_output(f"Errors:\n{result.stderr}")
|
|
||||||
passed.append(edit)
|
passed.append(edit)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
self.io.tool_error(f"Command execution failed. Error:\n{e.stderr}")
|
self.io.tool_output(e.output)
|
||||||
failed.append(edit)
|
failed.append(edit)
|
||||||
else:
|
else:
|
||||||
self.io.tool_output("Command execution skipped.")
|
|
||||||
failed.append(edit)
|
failed.append(edit)
|
||||||
else:
|
else:
|
||||||
path, original, updated = edit
|
path, original, updated = edit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue