Reland Usage of TERM to distinguish between msys and cygwin.

BUG=70548
TEST=check $TERM in windows
Review URL: http://codereview.chromium.org/6683035

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77978 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl/git_cl.py b/git_cl/git_cl.py
index 3b7ca33..c3631e6 100644
--- a/git_cl/git_cl.py
+++ b/git_cl/git_cl.py
@@ -712,9 +712,8 @@
 
   # Open up the default editor in the system to get the CL description.
   cmd = [editor, filename]
-  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.
+  if sys.platform == 'win32' and os.environ.get('TERM') == 'msys':
+    # Msysgit requires the usage of 'env' to be present.
     cmd.insert(0, 'env')
   try:
     subprocess.check_call(cmd)