Skip to content

Commit

Permalink
fix some common failure modes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcmengel committed Nov 13, 2024
1 parent ea6a3fe commit 157cf7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ parse_args() {
esac
done
dest=${1:-$PWD/spack}
case x$dest in
x/*) ;;
x*) echo "Error: Destination diretory $dest must be an absolute path"; exit 1;;
esac
if [ -d $dest ]
then
echo "FAIL: Destination directory $d already exists. " >&2
echo "FAIL: Destination directory $dest already exists. " >&2
exit 1
fi
}
Expand Down
3 changes: 3 additions & 0 deletions bin/make_subspack
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,16 @@ args="--depth 2"
if [ $spack_repo = default ]
then
spack_repo=$src/.git
# prevent bogus file permission fails on cvmfs...
git config --global --add safe.directory $spack_repo
fi
if [ $spack_release = default ]
then
branchbits=""
else
branchbits="-b $spack_release"
fi

git clone $args $branchbits $spack_repo $SPACK_ROOTb
cd $SPACK_ROOT

Expand Down

0 comments on commit 157cf7c

Please sign in to comment.