From ac2a3cf296e82a145966cd02e9637672f2180d29 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 11 Mar 2023 14:47:10 +0000 Subject: [PATCH] fix: exit code bug --- lgsm/functions/core_dl.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 8321b8da6..38aafaa39 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -372,12 +372,13 @@ fn_fetch_file() { fn_sleep_time echo -en "\033[1K" curlcmd=$(curl --connect-timeout 10 --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}") + local exitcode=$? echo -en "downloading ${local_filename}..." else echo -en "fetching ${fileurl_name} ${local_filename}...\c" curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) + local exitcode=$? fi - local exitcode=$? # Download will fail if downloads a html file. if [ -f "${local_filedir}/${local_filename}" ]; then