From 972704bf1eda83d3f1d9f9474ba1aa85848bbd7d Mon Sep 17 00:00:00 2001 From: tickelton Date: Fri, 21 May 2021 22:42:36 +0200 Subject: [PATCH] Fixes installation using wget Fixes an issue where during installation using wget an uninitialized variable was read which caused the process to get stuck. --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 296f7bdbb76..b0a845c54b4 100755 --- a/install.sh +++ b/install.sh @@ -122,7 +122,8 @@ getFile() { if [ "$DOWNLOAD_TOOL" = "curl" ]; then httpStatusCode=$(curl -s -w '%{http_code}' -L "$url" -o "$filePath") elif [ "$DOWNLOAD_TOOL" = "wget" ]; then - body=$(wget --server-response --content-on-error -q -O "$filePath" "$url") + tmpFile=$(mktemp) + body=$(wget --server-response --content-on-error -q -O "$filePath" "$url" 2> $tmpFile || true) httpStatusCode=$(cat $tmpFile | awk '/^ HTTP/{print $2}') fi echo "$httpStatusCode"