From 484fdd7aa3015832a7d2e56d4f3a971bf1f6c668 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 10 Sep 2024 12:06:45 -0700 Subject: [PATCH] fix: handle ValueError exception in run_cmd_pexpect function --- aider/run_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/run_cmd.py b/aider/run_cmd.py index 103f4042b..974af9c37 100644 --- a/aider/run_cmd.py +++ b/aider/run_cmd.py @@ -126,6 +126,6 @@ def run_cmd_pexpect(command, verbose=False): child.close() return child.exitstatus, output.getvalue().decode("utf-8", errors="replace") - except (pexpect.ExceptionPexpect, TypeError) as e: + except (pexpect.ExceptionPexpect, TypeError, ValueError) as e: error_msg = f"Error running command {command}: {e}" return 1, error_msg