diff --git a/scripts/install.sh b/scripts/install.sh index c35a2c85..f1dbf1ab 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -146,14 +146,20 @@ curl_download() { # allow curl to fail w/o exiting set +e - headers=$(curl --tlsv1.2 --proto "=https" -w "%{http_code}" --silent --retry 5 -o "$output_file" -LN -D - "$url" 2>&1) + headers=$(curl --tlsv1.2 --proto "=https" -w "%{http_code}" --retry 5 -o "$output_file" -LN -D - "$url" 2>&1) exit_code=$? set -e + log_debug "%{http_code}" + log_debug "NIC: $headers" + status_code="$(echo "$headers" | tail -1)" if [ "$status_code" -ne 200 ]; then log_debug "Request failed with http status $status_code" + log_debug "NIC: $url" + log_debug "NIC: $headers" + log_debug "NIC: $exit_code" log_debug "Response headers:" log_debug "$headers" fi @@ -217,6 +223,7 @@ wget_download() { if [ "$valid_status_code" -eq 1 ]; then # print the code and continue log_debug "Request failed with http status $status_code" + log_debug "NIC: $headers" log_debug "Response headers:" log_debug "$headers" else