Set GIT_EDITOR environment variable only if it is not already set.

This commit is contained in:
Paul Gauthier 2024-05-24 12:43:53 -07:00
parent 9aee429657
commit d41bf592a0

View file

@ -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,