From d41bf592a0d980da29829d3fc1a7e5ac183be26b Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 24 May 2024 12:43:53 -0700 Subject: [PATCH] Set GIT_EDITOR environment variable only if it is not already set. --- aider/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aider/commands.py b/aider/commands.py index 79a186b2a..b052e5c95 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -520,7 +520,8 @@ class Commands: combined_output = None try: args = "git " + args - env = dict(GIT_EDITOR="true", **subprocess.os.environ) + if 'GIT_EDITOR' not in subprocess.os.environ: + env = dict(GIT_EDITOR="true", **subprocess.os.environ) result = subprocess.run( args, stdout=subprocess.PIPE,