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:
parent
8f9f0ab8ec
commit
158f99f9ad
1 changed files with 2 additions and 0 deletions
|
@ -92,6 +92,8 @@ function spack {
|
|||
LOC="$(spack location $_sp_arg "$@")"
|
||||
if [[ -d "$LOC" ]] ; then
|
||||
cd "$LOC"
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue