Return an error exit code if spack cd does not succeed. (#4623)

* Return an error exit code if spack cd does not succeed.

* Reducing amount of return statements in spack cd exit code.
This commit is contained in:
Jon Rood 2017-06-28 05:41:04 -06:00 committed by Adam J. Stewart
parent 8f9f0ab8ec
commit 158f99f9ad

View file

@ -92,6 +92,8 @@ function spack {
LOC="$(spack location $_sp_arg "$@")"
if [[ -d "$LOC" ]] ; then
cd "$LOC"
else
return 1
fi
fi
return