diff --git a/bootstrap/replicate.sh b/bootstrap/replicate.sh
index 8f0beb7..2ab0eea 100755
--- a/bootstrap/replicate.sh
+++ b/bootstrap/replicate.sh
@@ -14,8 +14,9 @@ repo='git@gitlab.com:rehashedsalt/home.git'
 config='git --git-dir="$gitdir" --work-tree="$homedir"'
 
 git clone --recursive --separate-git-dir="$gitdir" "$repo" "$tempfolder"
-if ! $?; then
-	printf "$0: error: failed cloning repository \"$repo\"\n" 1>&2
+error="$?"
+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"
 	exit 2
 fi