diff options
author | Massimiliano Culpo <massimiliano.culpo@googlemail.com> | 2016-05-02 18:26:05 +0200 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@googlemail.com> | 2016-05-02 18:26:05 +0200 |
commit | cfc25d0a927f47018a29668bbcdcc335ae04ffdb (patch) | |
tree | ab696efbd1cf91ac139ffa286e213cd2b453079c /share | |
parent | 6cffac79bd39443047d380eb46121a43a256737e (diff) | |
parent | 6dad59cb9246a6740df708cb356cfed35a66aa87 (diff) | |
download | spack-cfc25d0a927f47018a29668bbcdcc335ae04ffdb.tar.gz spack-cfc25d0a927f47018a29668bbcdcc335ae04ffdb.tar.bz2 spack-cfc25d0a927f47018a29668bbcdcc335ae04ffdb.tar.xz spack-cfc25d0a927f47018a29668bbcdcc335ae04ffdb.zip |
Merge branch 'develop' into openmpi_variants
Diffstat (limited to 'share')
-rwxr-xr-x | share/spack/setup-env.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index 764af68400..11a4c0a70c 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -1,4 +1,4 @@ -############################################################################## +##################################################################### # Copyright (c) 2013, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # @@ -84,7 +84,10 @@ function spack { if [ "$_sp_arg" = "-h" ]; then command spack cd -h else - cd $(spack location $_sp_arg "$@") + LOC="$(spack location $_sp_arg "$@")" + if [[ -d "$LOC" ]] ; then + cd "$LOC" + fi fi return ;; |