diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2019-09-16 13:10:36 -0500 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2019-09-16 11:10:36 -0700 |
commit | 5eac8130b3440eaf2cc26a1ccde1c2da702abb2c (patch) | |
tree | 0c3c175ad4457b26ec8ebab4c655aea9760c8714 /lib | |
parent | 14ef0c238ebc178e13c7a591ca6cf4b367681ca5 (diff) | |
download | spack-5eac8130b3440eaf2cc26a1ccde1c2da702abb2c.tar.gz spack-5eac8130b3440eaf2cc26a1ccde1c2da702abb2c.tar.bz2 spack-5eac8130b3440eaf2cc26a1ccde1c2da702abb2c.tar.xz spack-5eac8130b3440eaf2cc26a1ccde1c2da702abb2c.zip |
Quote shell variable values (#12759)
This updates logic which sets shell variables to quote the values,
which is necessary when the value contains a space (e.g. PATH).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/util/environment.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/util/environment.py b/lib/spack/spack/util/environment.py index 33f1379c4f..63f428dd06 100644 --- a/lib/spack/spack/util/environment.py +++ b/lib/spack/spack/util/environment.py @@ -492,8 +492,8 @@ class EnvironmentModifications(object): if new is None: cmds += _shell_unset_strings[shell].format(name) else: - cmds += _shell_set_strings[shell].format(name, - new_env[name]) + cmds += _shell_set_strings[shell].format( + name, cmd_quote(new_env[name])) return cmds @staticmethod |