Skip to content
Snippets Groups Projects
Commit 3c10e3b5 authored by becker33's avatar becker33
Browse files

Merge pull request #861 from trws/cd-fix

check that a target directory exists before committing to cd
parents 1b731e52 10d8ed4d
No related branches found
No related tags found
No related merge requests found
##############################################################################
#####################################################################
# 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 [[ "x" -ne "x$LOC" ]] ; then
cd "$LOC"
fi
fi
return
;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment