[GRASS-SVN] r50175 - grass/trunk/lib/init

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 14 01:47:34 EST 2012


Author: hamish
Date: 2012-01-13 22:47:34 -0800 (Fri, 13 Jan 2012)
New Revision: 50175

Modified:
   grass/trunk/lib/init/grass.py
Log:
variables are already exported in the working environment for that grass session, no need to save them to the mapset's .bashrc file too. by doing that it was overwriting any GRASS_ enviro vars you'd manually set in ~/.grass.bashrc (e.g. GRASS_HTML_BROWSER)

Modified: grass/trunk/lib/init/grass.py
===================================================================
--- grass/trunk/lib/init/grass.py	2012-01-14 02:11:34 UTC (rev 50174)
+++ grass/trunk/lib/init/grass.py	2012-01-14 06:47:34 UTC (rev 50175)
@@ -852,11 +852,6 @@
     f.write("export PATH=\"%s\"\n" % os.getenv('PATH'))
     f.write("export HOME=\"%s\"\n" % userhome) # restore user home path
     
-    for env, value in os.environ.iteritems():
-        if env.find('GRASS_') < 0:
-            continue
-        f.write("export %s=\"%s\"\n" % (env, value))
-    
     f.close()
     
     exit_val = call([gfile("etc", "run"), os.getenv('SHELL')])



More information about the grass-commit mailing list