Merge pull request #187 from joshuavial/fix-git-editor-crash

disabling GIT_EDITOR when calling /git
This commit is contained in:
paul-gauthier 2023-08-08 08:11:41 -03:00 committed by GitHub
commit 67b7107786
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -350,8 +350,9 @@ class Commands:
combined_output = None
try:
parsed_args = shlex.split("git " + args)
env = dict(GIT_EDITOR="true", **subprocess.os.environ)
result = subprocess.run(
parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True
parsed_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, env=env
)
combined_output = result.stdout
except Exception as e: