We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2666b6e commit cbe85bbCopy full SHA for cbe85bb
install.sh
@@ -122,7 +122,8 @@ getFile() {
122
if [ "$DOWNLOAD_TOOL" = "curl" ]; then
123
httpStatusCode=$(curl -s -w '%{http_code}' -L "$url" -o "$filePath")
124
elif [ "$DOWNLOAD_TOOL" = "wget" ]; then
125
- body=$(wget --server-response --content-on-error -q -O "$filePath" "$url")
+ tmpFile=$(mktemp)
126
+ body=$(wget --server-response --content-on-error -q -O "$filePath" "$url" 2> $tmpFile || true)
127
httpStatusCode=$(cat $tmpFile | awk '/^ HTTP/{print $2}')
128
fi
129
echo "$httpStatusCode"
0 commit comments