浏览代码

wxGUI/launch script: modify PATH for given session

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54492 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 年之前
父节点
当前提交
844e6607b1
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      gui/wxpython/core/utils.py

+ 5 - 1
gui/wxpython/core/utils.py

@@ -866,7 +866,11 @@ def SetAddOnPath(addonPath = None, key = 'PATH'):
     
     StoreEnvVariable(key = 'GRASS_ADDON_' + key, value = addonPath)
     os.environ['GRASS_ADDON_' + key] = addonPath
-
+    
+    # update path
+    if addonPath not in os.environ['PATH']:
+        os.environ['PATH'] = addonPath + os.pathsep + os.environ['PATH']
+    
 # From lib/gis/col_str.c, except purple which is mentioned
 # there but not given RGB values
 str2rgb = {'aqua': (100, 128, 255),