diff options
author | Tom Scogland <scogland1@llnl.gov> | 2016-04-29 09:33:54 -0700 |
---|---|---|
committer | Tom Scogland <scogland1@llnl.gov> | 2016-04-29 09:34:18 -0700 |
commit | 584501a1cc34165671d0d4e9e2ae27d9cae8cdf9 (patch) | |
tree | a89e9dad7260a3aa8e9d5d4569de438bff243cf0 /share/spack | |
parent | 3c10e3b502520158a91258920eb6d935ea5de51a (diff) | |
download | spack-584501a1cc34165671d0d4e9e2ae27d9cae8cdf9.tar.gz spack-584501a1cc34165671d0d4e9e2ae27d9cae8cdf9.tar.bz2 spack-584501a1cc34165671d0d4e9e2ae27d9cae8cdf9.tar.xz spack-584501a1cc34165671d0d4e9e2ae27d9cae8cdf9.zip |
switched test to use -d for location check
Diffstat (limited to 'share/spack')
-rwxr-xr-x | share/spack/setup-env.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index e3dd1cb4b9..11a4c0a70c 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -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 ;; |