diff --git a/aider/commands.py b/aider/commands.py index b052e5c95..9ff6098f7 100644 --- a/aider/commands.py +++ b/aider/commands.py @@ -520,8 +520,8 @@ class Commands: combined_output = None try: args = "git " + args - if 'GIT_EDITOR' not in subprocess.os.environ: - env = dict(GIT_EDITOR="true", **subprocess.os.environ) + env = dict(subprocess.os.environ) + env["GIT_EDITOR"] = "true" result = subprocess.run( args, stdout=subprocess.PIPE,