Skip to content

Commit

Permalink
load_env: Use double backslashes for escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
HuidaeCho authored and neteler committed Dec 13, 2019
1 parent 9a85264 commit c9d3dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/init/grass.py
Expand Up @@ -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

Expand Down

0 comments on commit c9d3dcf

Please sign in to comment.