Skip to content

Commit c2636ff

Browse files
committed
Added --show-error flag to curl command line
This change will show more information when the download fails. -S, --show-error When used with -s, --silent, it makes curl show an error message if it fails.
1 parent 7055f2a commit c2636ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ getFile() {
102102
GETFILE_URL="$1"
103103
GETFILE_FILE_PATH="$2"
104104
if [ "$DOWNLOAD_TOOL" = "curl" ]; then
105-
GETFILE_HTTP_STATUS_CODE=$(curl -s -w '%{http_code}' -L "$GETFILE_URL" -o "$GETFILE_FILE_PATH")
105+
GETFILE_HTTP_STATUS_CODE=$(curl --silent --show-error --write-out '%{http_code}' --location "$GETFILE_URL" -o "$GETFILE_FILE_PATH")
106106
elif [ "$DOWNLOAD_TOOL" = "wget" ]; then
107107
TMP_FILE=$(mktemp)
108108
wget --server-response --content-on-error -q -O "$GETFILE_FILE_PATH" "$GETFILE_URL" 2>"$TMP_FILE"

0 commit comments

Comments
 (0)