From f481b51c9d205e6af87c3a201fae4247954eb652 Mon Sep 17 00:00:00 2001 From: billz Date: Fri, 27 Oct 2023 09:26:19 +0100 Subject: [PATCH] Update _download_latest_files() exit on clone failure --- installers/common.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/installers/common.sh b/installers/common.sh index 5207973f..05c15ee0 100755 --- a/installers/common.sh +++ b/installers/common.sh @@ -562,7 +562,13 @@ function _download_latest_files() { _install_status 3 echo "Insiders please read this: https://docs.raspap.com/insiders/#authentication" fi - git clone --branch $branch --depth 1 -c advice.detachedHead=false $git_source_url /tmp/raspap-webgui || _install_status 1 "Unable to download files from github" + git clone --branch $branch --depth 1 -c advice.detachedHead=false $git_source_url /tmp/raspap-webgui || clone=false + if [ "$clone" = false ]; then + _install_status 1 "Unable to download files from github" + echo "The installer cannot continue." >&2 + exit 1 + fi + sudo mv /tmp/raspap-webgui $webroot_dir || _install_status 1 "Unable to move raspap-webgui to web root" if [ "$upgrade" == 1 ]; then