switched test to use -d for location check
This commit is contained in:
parent
3c10e3b502
commit
584501a1cc
@ -84,10 +84,10 @@ function spack {
|
|||||||
if [ "$_sp_arg" = "-h" ]; then
|
if [ "$_sp_arg" = "-h" ]; then
|
||||||
command spack cd -h
|
command spack cd -h
|
||||||
else
|
else
|
||||||
LOC="$(spack location $_sp_arg "$@")"
|
LOC="$(spack location $_sp_arg "$@")"
|
||||||
if [[ "x" -ne "x$LOC" ]] ; then
|
if [[ -d "$LOC" ]] ; then
|
||||||
cd "$LOC"
|
cd "$LOC"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user