From e7692fc9d130acfbb2c4a3d9cb63a78fa5b47483 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Sun, 16 Jul 2023 18:27:51 -0300 Subject: [PATCH 1/3] added apt update --- docs/install.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/install.md b/docs/install.md index c607d7da6..0389a0ba4 100644 --- a/docs/install.md +++ b/docs/install.md @@ -75,9 +75,9 @@ You should consult the for official instructions on how to install it in your environment. 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` -* 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: From a2d8bed1553fe593dd4134938c4d8800b7742e63 Mon Sep 17 00:00:00 2001 From: Amer Amayreh <129025554+ameramayreh@users.noreply.github.com> Date: Mon, 17 Jul 2023 06:04:47 +0300 Subject: [PATCH 2/3] Handled Issue #114 Handled the UnboundLocalError tat occurs when wrong prams are passed to the `/run` command --- aider/commands.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aider/commands.py b/aider/commands.py index eae6b8a89..a17b57edb 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -333,6 +333,7 @@ class Commands: def cmd_run(self, args): "Run a shell command and optionally add the output to the chat" + combined_output = None try: parsed_args = shlex.split(args) result = subprocess.run( @@ -342,6 +343,9 @@ class Commands: except Exception as e: self.io.tool_error(f"Error running command: {e}") + if combined_output is None: + return + self.io.tool_output(combined_output) if self.io.confirm_ask("Add the output to the chat?", default="y"): From 1f07de8670489fa40944148b7214e135d0a05ecf Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 17 Jul 2023 08:19:21 -0300 Subject: [PATCH 3/3] Added hint to Use --encoding to set the unicode encoding. --- aider/io.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aider/io.py b/aider/io.py index 086813b61..dee90b78f 100644 --- a/aider/io.py +++ b/aider/io.py @@ -148,6 +148,7 @@ class InputOutput: return except UnicodeError as e: self.tool_error(f"{filename}: {e}") + self.tool_error("Use --encoding to set the unicode encoding.") return def write_text(self, filename, content):