diff --git a/gcl.py b/gcl.py index 775a780836..ce259bcfa7 100755 --- a/gcl.py +++ b/gcl.py @@ -1065,8 +1065,9 @@ def CMDchange(args): # Open up the default editor in the system to get the CL description. cmd = [GetEditor(), filename] - if sys.platform == 'win32' and os.environ['TERM'] == 'msys': - # Msysgit requires the usage of 'env' to be present. + if sys.platform == 'win32' and 'mingw\\bin' in os.environ['PATH']: + # Msysgit requires the usage of 'env' to be present. The only way to + # accomplish that is by reading the environment variable for mingw\bin. cmd.insert(0, 'env') try: if not silent: diff --git a/git_cl/git_cl.py b/git_cl/git_cl.py index 0c50651ad4..3b7ca33429 100644 --- a/git_cl/git_cl.py +++ b/git_cl/git_cl.py @@ -712,8 +712,9 @@ def UserEditedLog(starting_text): # Open up the default editor in the system to get the CL description. cmd = [editor, filename] - if sys.platform == 'win32' and os.environ['TERM'] == 'msys': - # Msysgit requires the usage of 'env' to be present. + if sys.platform == 'win32' and 'mingw\\bin' in os.environ['PATH']: + # Msysgit requires the usage of 'env' to be present. The only way to + # accomplish that is by reading the environment variable for mingw\bin. cmd.insert(0, 'env') try: subprocess.check_call(cmd)