Export spack function so it works in subshells (#2908)

This commit is contained in:
Michael Kuhn 2017-01-24 00:29:25 +01:00 committed by Todd Gamblin
parent c76088906e
commit 258dfc707d

View File

@ -167,6 +167,11 @@ function _spack_pathadd {
fi
}
# Export spack function so it is available in subshells (only works with bash)
if [ -n "${BASH_VERSION:-}" ]; then
export -f spack
fi
#
# Figure out where this file is. Below code needs to be portable to
# bash and zsh.