From 102ff763287bd9b1346f394f945cf448ea570b4f Mon Sep 17 00:00:00 2001 From: ifNil <2278069802@qq.com> Date: Fri, 5 Jan 2024 13:30:33 +0800 Subject: [PATCH] Print error when downloading file error inside install script (#6874) * Print error when downloading file error inside install script * Update install.sh.sha256sum Signed-off-by: yhw <2278069802@qq.com> --- install.sh | 3 ++- install.sh.sha256sum | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index da42ad57b2..d27e33be16 100644 --- a/install.sh +++ b/install.sh @@ -414,7 +414,7 @@ get_k3s_selinux_version() { # --- download from github url --- download() { [ $# -eq 2 ] || fatal 'download needs exactly 2 arguments' - + set +e case $DOWNLOADER in curl) curl -o $1 -sfL $2 @@ -429,6 +429,7 @@ download() { # Abort if download command failed [ $? -eq 0 ] || fatal 'Download failed' + set -e } # --- download hash from github url --- diff --git a/install.sh.sha256sum b/install.sh.sha256sum index 703652e569..25d9095099 100644 --- a/install.sh.sha256sum +++ b/install.sh.sha256sum @@ -1 +1 @@ -151d816884423621b302cc3b429e71a29f8d0720608ffc16a7a6ae20570a50e4 install.sh +431c6fe653336279073e5b913557aa22d7ef1794b30b4f02002b4482910464d7 install.sh