From c0a2b8b57c38f535c378a4df692ce025af462ef6 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Mon, 29 Jul 2024 17:11:31 -0300 Subject: [PATCH] Ensure `instructions` variable is always defined in `cmd_run` method --- aider/commands.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aider/commands.py b/aider/commands.py index b981aba0a..7a617fc5d 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -652,6 +652,7 @@ class Commands: def cmd_run(self, args, add_on_nonzero_exit=False): "Run a shell command and optionally add the output to the chat (alias: !)" combined_output = None + instructions = None try: result = subprocess.run( args, @@ -680,10 +681,8 @@ class Commands: if response.lower() in ["yes", "y"]: add = True - instructions = None elif response.lower() in ["no", "n"]: add = False - instructions = None else: add = True instructions = response