Explorar el Código

load_env: Use double backslashes for escaping

Huidae Cho hace 5 años
padre
commit
90a2302a19
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/init/grass.py

+ 1 - 1
lib/init/grass.py

@@ -1179,7 +1179,7 @@ def load_env(grass_env_file):
             debug("Ignore multi-line environmental variable {0}".format(k))
             continue
         if expand:
-            v = os.path.expanduser(os.path.expandvars(v.replace('\$', '\0')).replace('\0', '$'))
+            v = os.path.expanduser(os.path.expandvars(v.replace('\\$', '\0')).replace('\0', '$'))
         debug("Environmental variable set {0}={1}".format(k, v))
         os.environ[k] = v