From 5eac8130b3440eaf2cc26a1ccde1c2da702abb2c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 16 Sep 2019 13:10:36 -0500 Subject: 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). --- lib/spack/spack/util/environment.py | 4 ++-- 1 file 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 -- cgit v1.2.3-70-g09d2