diff options
author | Jon Rood <jon.rood@nrel.gov> | 2017-06-28 05:41:04 -0600 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2017-06-28 06:41:04 -0500 |
commit | 158f99f9ad51714059cc1c5ec2e21c77ab045f71 (patch) | |
tree | 73a284ab0dc5faa0ef52ef620d8228ed213a95a9 /share | |
parent | 8f9f0ab8ec4180d570e94d988b6fe5d15ea9a223 (diff) | |
download | spack-158f99f9ad51714059cc1c5ec2e21c77ab045f71.tar.gz spack-158f99f9ad51714059cc1c5ec2e21c77ab045f71.tar.bz2 spack-158f99f9ad51714059cc1c5ec2e21c77ab045f71.tar.xz spack-158f99f9ad51714059cc1c5ec2e21c77ab045f71.zip |
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.
Diffstat (limited to 'share')
-rwxr-xr-x | share/spack/setup-env.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 5c1558f7fc..232d824170 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 |