Explorar o código

using sys.platform to determine if running in Cygwin

Checking CYGWIN environmental variable is unreliable. See ticket https://trac.osgeo.org/grass/ticket/2395.

It is not clear if sys.platform should be used with equals, in, or startswith but using equals here since it is safe for cygwin and it is used elsewhere.

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@61705 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras %!s(int64=10) %!d(string=hai) anos
pai
achega
80dafe9939
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/init/grass.py

+ 1 - 1
lib/init/grass.py

@@ -905,7 +905,7 @@ def check_shell():
     global sh, shellname, grass_env_file
     # cygwin has many problems with the shell setup
     # below, so i hardcoded everything here.
-    if os.getenv('CYGWIN'):
+    if sys.platform == 'cygwin':
         sh = "cygwin"
         shellname = "GNU Bash (Cygwin)"
         os.environ['SHELL'] = "/usr/bin/bash.exe"