From 24d73787cd0ee0267508b68d70e16662dbde0154 Mon Sep 17 00:00:00 2001
From: Daniel Gibbs <me@danielgibbs.co.uk>
Date: Wed, 10 Aug 2016 12:01:30 +0100
Subject: [PATCH] uf will fail if remote file missing #983

---
 lgsm/functions/core_dl.sh   | 3 ++-
 lgsm/functions/core_exit.sh | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh
index b8764ddf4..52155dc49 100644
--- a/lgsm/functions/core_dl.sh
+++ b/lgsm/functions/core_dl.sh
@@ -130,8 +130,8 @@ fn_fetch_file(){
 				if [ -f "${scriptlog}" ]; then
 					fn_script_log_fatal "downloading ${filename}: FAIL"
 				fi
+				echo -e "${fileurl}" | tee -a "${scriptlog}"
 				echo "${curlcmd}" | tee -a "${scriptlog}"
-				echo -e "${fileurl}\n" | tee -a "${scriptlog}"
 				core_exit.sh
 			else
 				fn_print_ok_eol_nl
@@ -208,6 +208,7 @@ fn_fetch_function(){
 }
 
 fn_update_function(){
+	exitbypass=1
 	github_file_url_dir="lgsm/functions" # github dir containing the file
 	github_file_url_name="${functionfile}" # name of the github file
 	githuburl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh
index 71580ae4f..d5f17dfe5 100644
--- a/lgsm/functions/core_exit.sh
+++ b/lgsm/functions/core_exit.sh
@@ -35,4 +35,3 @@ else
 	trap - INT
 	exit ${exitcode}
 fi
-