mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
aider: Fixed indentation of cmd_run
function in aider/commands.py
.
# Context: USER: remove all the line numbers fro the start of the lines, restoring proper indentation. only edit the lines that have line numbers. ASSISTANT: ```python aider/commands.py <<<<<<< ORIGINAL 228 def cmd_run(self, args): 229 "Run the supplied command in a subprocess and combine stdout and stderr into a single string" 230 try: 231 parsed_args = shlex.split(args) 232 result = subprocess.run(parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) 233 combined_output = result.stdout 233 print(combined_output) 234 except Exception as e: 235 self.io.tool_error(f"Error running command: {e}") ======= def cmd_run(self, args): "Run the supplied command in a subprocess and combine stdout and stderr into a single string" try: parsed_args = shlex.split(args) result = subprocess.run(parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True) combined_output = result.stdout print(combined_output) except Exception as e: self.io.tool_error(f"Error running command: {e}") >>>>>>> UPDATED ```
This commit is contained in:
parent
07da14d3c7
commit
01aafe1265
1 changed files with 9 additions and 9 deletions
|
@ -226,15 +226,15 @@ class Commands:
|
||||||
self.coder.abs_fnames.remove(matched_file)
|
self.coder.abs_fnames.remove(matched_file)
|
||||||
self.io.tool(f"Removed {relative_fname} from the chat")
|
self.io.tool(f"Removed {relative_fname} from the chat")
|
||||||
|
|
||||||
228 def cmd_run(self, args):
|
def cmd_run(self, args):
|
||||||
229 "Run the supplied command in a subprocess and combine stdout and stderr into a single string"
|
"Run the supplied command in a subprocess and combine stdout and stderr into a single string"
|
||||||
230 try:
|
try:
|
||||||
231 parsed_args = shlex.split(args)
|
parsed_args = shlex.split(args)
|
||||||
232 result = subprocess.run(parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
|
result = subprocess.run(parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True)
|
||||||
233 combined_output = result.stdout
|
combined_output = result.stdout
|
||||||
233 print(combined_output)
|
print(combined_output)
|
||||||
234 except Exception as e:
|
except Exception as e:
|
||||||
235 self.io.tool_error(f"Error running command: {e}")
|
self.io.tool_error(f"Error running command: {e}")
|
||||||
236
|
236
|
||||||
237 def cmd_ls(self, args):
|
237 def cmd_ls(self, args):
|
||||||
238 "List all known files and those included in the chat session"
|
238 "List all known files and those included in the chat session"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue