[GRASS-SVN] r61705 - grass/trunk/lib/init
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 20 08:34:25 PDT 2014
Author: wenzeslaus
Date: 2014-08-20 08:34:25 -0700 (Wed, 20 Aug 2014)
New Revision: 61705
Modified:
grass/trunk/lib/init/grass.py
Log:
using sys.platform to determine if running in Cygwin
Checking CYGWIN environmental variable is unreliable. See 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.
Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py 2014-08-20 14:39:29 UTC (rev 61704)
+++ grass/trunk/lib/init/grass.py 2014-08-20 15:34:25 UTC (rev 61705)
@@ -905,7 +905,7 @@
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"
More information about the grass-commit
mailing list