switched test to use -d for location check

This commit is contained in:
Tom Scogland 2016-04-29 09:33:54 -07:00
parent 3c10e3b502
commit 584501a1cc

View File

@ -84,10 +84,10 @@ function spack {
if [ "$_sp_arg" = "-h" ]; then
command spack cd -h
else
LOC="$(spack location $_sp_arg "$@")"
if [[ "x" -ne "x$LOC" ]] ; then
LOC="$(spack location $_sp_arg "$@")"
if [[ -d "$LOC" ]] ; then
cd "$LOC"
fi
fi
fi
return
;;