Explorar o código

grass.py: workaround for bug related to OS X, see https://trac.osgeo.org/grass/ticket/3462

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72095 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=7) %!d(string=hai) anos
pai
achega
9501db6f74
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      lib/init/grass.py

+ 3 - 1
lib/init/grass.py

@@ -1620,7 +1620,9 @@ PROMPT_COMMAND=grass_prompt\n""" % (_("2D and 3D raster MASKs present"),
         if not os.access(env_file, os.R_OK):
         if not os.access(env_file, os.R_OK):
             continue
             continue
         for line in readfile(env_file).splitlines():
         for line in readfile(env_file).splitlines():
-            if not line.startswith('export'):
+            # Bug related to OS X "SIP", see
+            # https://trac.osgeo.org/grass/ticket/3462#comment:13
+            if macosx or not line.startswith('export'):
                 f.write(line + '\n')
                 f.write(line + '\n')
 
 
     f.write("export PATH=\"%s\"\n" % os.getenv('PATH'))
     f.write("export PATH=\"%s\"\n" % os.getenv('PATH'))