瀏覽代碼

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 7 年之前
父節點
當前提交
9501db6f74
共有 1 個文件被更改,包括 3 次插入1 次删除
  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):
             continue
         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("export PATH=\"%s\"\n" % os.getenv('PATH'))