Replicate: Fix git failure check

I feel like I understand failure very thoroughly now
This commit is contained in:
Salt 2018-08-20 15:23:05 -05:00
parent 47b496ef58
commit c5f650ca72

View File

@ -14,8 +14,9 @@ repo='git@gitlab.com:rehashedsalt/home.git'
config='git --git-dir="$gitdir" --work-tree="$homedir"' config='git --git-dir="$gitdir" --work-tree="$homedir"'
git clone --recursive --separate-git-dir="$gitdir" "$repo" "$tempfolder" git clone --recursive --separate-git-dir="$gitdir" "$repo" "$tempfolder"
if ! $?; then error="$?"
printf "$0: error: failed cloning repository \"$repo\"\n" 1>&2 if ! [ "$error" == "0" ]; then
printf "$0: error: failed cloning repository \"$repo\": $error\n" 1>&2
printf "Do you have the appropriate permissions? Does the remote host know your key?\n" printf "Do you have the appropriate permissions? Does the remote host know your key?\n"
exit 2 exit 2
fi fi