Merge branch 'main' into gitignore

This commit is contained in:
Paul Gauthier 2023-07-17 08:27:09 -03:00
commit 402f8f4971
3 changed files with 7 additions and 2 deletions

View file

@ -333,6 +333,7 @@ class Commands:
def cmd_run(self, args): def cmd_run(self, args):
"Run a shell command and optionally add the output to the chat" "Run a shell command and optionally add the output to the chat"
combined_output = None
try: try:
parsed_args = shlex.split(args) parsed_args = shlex.split(args)
result = subprocess.run( result = subprocess.run(
@ -342,6 +343,9 @@ class Commands:
except Exception as e: except Exception as e:
self.io.tool_error(f"Error running command: {e}") self.io.tool_error(f"Error running command: {e}")
if combined_output is None:
return
self.io.tool_output(combined_output) self.io.tool_output(combined_output)
if self.io.confirm_ask("Add the output to the chat?", default="y"): if self.io.confirm_ask("Add the output to the chat?", default="y"):

View file

@ -148,6 +148,7 @@ class InputOutput:
return return
except UnicodeError as e: except UnicodeError as e:
self.tool_error(f"{filename}: {e}") self.tool_error(f"{filename}: {e}")
self.tool_error("Use --encoding to set the unicode encoding.")
return return
def write_text(self, filename, content): def write_text(self, filename, content):

View file

@ -75,9 +75,9 @@ You should consult the
for official instructions on how to install it in your environment. for official instructions on how to install it in your environment.
But you may be able to install a compatible version using these commands: But you may be able to install a compatible version using these commands:
* Mac: `brew install universal-ctags` * Mac: `brew update && brew install universal-ctags`
* Windows: `choco install universal-ctags` * Windows: `choco install universal-ctags`
* Ubuntu: `sudo apt-get install universal-ctags` * Ubuntu: `sudo apt update && sudo apt install universal-ctags`
You know aider has found a working ctags if you see this output when you launch aider: You know aider has found a working ctags if you see this output when you launch aider: