Support Bash "-u" mode

This commit is contained in:
Erik Schnetter 2016-03-19 18:42:06 -04:00
parent c50d6ac902
commit f5f7d47be1

View File

@ -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