diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 5c1558f7fce..232d8241705 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -92,6 +92,8 @@ function spack { LOC="$(spack location $_sp_arg "$@")" if [[ -d "$LOC" ]] ; then cd "$LOC" + else + return 1 fi fi return