Skip to content

Commit abb2232

Browse files
authored
fix install.sh not working with wget2
1 parent 33dfa8e commit abb2232

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: install.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ getFile() {
103103
if [ "$DOWNLOAD_TOOL" = "curl" ]; then
104104
GETFILE_HTTP_STATUS_CODE=$(curl -s -w '%{http_code}' -L "$GETFILE_URL" -o "$GETFILE_FILE_PATH")
105105
elif [ "$DOWNLOAD_TOOL" = "wget" ]; then
106-
wget --server-response --content-on-error -q -O "$GETFILE_FILE_PATH" "$GETFILE_URL"
106+
TMP_FILE=$(mktemp)
107+
wget --server-response --content-on-error -q -O "$GETFILE_FILE_PATH" "$GETFILE_URL" 2>"$TMP_FILE"
107108
GETFILE_HTTP_STATUS_CODE=$(awk '/^ HTTP/{print $2}' "$TMP_FILE")
108109
fi
109110
echo "$GETFILE_HTTP_STATUS_CODE"

0 commit comments

Comments
 (0)