Skip to content

Commit cbe85bb

Browse files
authored
[skip changelog] Fixes installation using wget (#1299)
Fixes an issue where during installation using wget an uninitialized variable was read which caused the process to get stuck.
1 parent 2666b6e commit cbe85bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

install.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ getFile() {
122122
if [ "$DOWNLOAD_TOOL" = "curl" ]; then
123123
httpStatusCode=$(curl -s -w '%{http_code}' -L "$url" -o "$filePath")
124124
elif [ "$DOWNLOAD_TOOL" = "wget" ]; then
125-
body=$(wget --server-response --content-on-error -q -O "$filePath" "$url")
125+
tmpFile=$(mktemp)
126+
body=$(wget --server-response --content-on-error -q -O "$filePath" "$url" 2> $tmpFile || true)
126127
httpStatusCode=$(cat $tmpFile | awk '/^ HTTP/{print $2}')
127128
fi
128129
echo "$httpStatusCode"

0 commit comments

Comments
 (0)