From f5f7d47be1a5fd8488ed4cdc692173fe136d9791 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Sat, 19 Mar 2016 18:42:06 -0400 Subject: Support Bash "-u" mode --- share/spack/setup-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 586a5b836b..764af68400 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -141,7 +141,7 @@ function _spack_pathadd { fi # Do the actual prepending here. - eval "_pa_oldvalue=\$${_pa_varname}" + eval "_pa_oldvalue=\${${_pa_varname}:-}" if [ -d "$_pa_new_path" ] && [[ ":$_pa_oldvalue:" != *":$_pa_new_path:"* ]]; then if [ -n "$_pa_oldvalue" ]; then -- cgit v1.2.3-70-g09d2