From c80315c8b720028d8b029132823dd29658ca8d7d Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 30 Apr 2023 00:36:37 +0200 Subject: [PATCH] Display exit code --- run/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/run/install.sh b/run/install.sh index 823e0a8..aeae0ce 100644 --- a/run/install.sh +++ b/run/install.sh @@ -69,9 +69,8 @@ else PROGRESS="--progress=dot:giga" fi -if ! wget "$URL" -O "$PAT" -q --no-check-certificate --show-progress "$PROGRESS"; then - echo "ERROR: Failed to download $URL" && exit 69 -fi +{ wget "$URL" -O "$PAT" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || : +(( rc != 0 )) && echo "ERROR: Failed to download $URL, reason: $rc" && exit 69 [ ! -f "$PAT" ] && echo "ERROR: Failed to download $URL" && exit 69