From 1def0c9104719b85981eee90458d5efef94154bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Budiseli=C4=87?= Date: Thu, 13 May 2021 12:05:36 +0200 Subject: [PATCH] Fix libs/setup.sh nocached download (#148) --- libs/setup.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/setup.sh b/libs/setup.sh index 08c073995..4278b7fb6 100755 --- a/libs/setup.sh +++ b/libs/setup.sh @@ -16,7 +16,11 @@ clone () { shift 3 # Clone if there's no repo. if [[ ! -d "$dir_name" ]]; then - git clone "$git_repo" "$dir_name" + echo "Cloning from $git_repo" + # If the clone fails, it doesn't make sense to continue with the function + # execution but the whole script should continue executing because we might + # clone the same repo from a different source. + git clone "$git_repo" "$dir_name" || return 1 fi pushd "$dir_name" # Just fetch new commits from remote repository. Don't merge/pull them in, so