summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2016-03-19 18:42:06 -0400
committerErik Schnetter <schnetter@gmail.com>2016-03-19 18:42:39 -0400
commitf5f7d47be1a5fd8488ed4cdc692173fe136d9791 (patch)
tree823bb2e87d4b81106354b25414f6fb167abc68d3 /share
parentc50d6ac9024fc74e5c8e784f9caf9d8950677991 (diff)
downloadspack-f5f7d47be1a5fd8488ed4cdc692173fe136d9791.tar.gz
spack-f5f7d47be1a5fd8488ed4cdc692173fe136d9791.tar.bz2
spack-f5f7d47be1a5fd8488ed4cdc692173fe136d9791.tar.xz
spack-f5f7d47be1a5fd8488ed4cdc692173fe136d9791.zip
Support Bash "-u" mode
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/setup-env.sh2
1 files changed, 1 insertions, 1 deletions
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