diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-05-05 10:49:15 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-05-05 10:49:15 -0700 |
commit | 9fb1a9537d7f93fde737e071c9b5f473a8ba6c78 (patch) | |
tree | 4a14604a702dfc273b712c0e725341d91be54c9c /share | |
parent | 4ba73dac34cdb3c3e5256b047449c763e4e38f7a (diff) | |
parent | 407920e40a6af71fd2a83a8245d6a62ab48e4ec8 (diff) | |
download | spack-9fb1a9537d7f93fde737e071c9b5f473a8ba6c78.tar.gz spack-9fb1a9537d7f93fde737e071c9b5f473a8ba6c78.tar.bz2 spack-9fb1a9537d7f93fde737e071c9b5f473a8ba6c78.tar.xz spack-9fb1a9537d7f93fde737e071c9b5f473a8ba6c78.zip |
Merge branch 'develop' into features/cflags
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 ;; |