Unverified Commit f3f1e105 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Apply suggested fix to src/mido.sh from Copilot Autofix

parent 6e45deea
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -188,7 +188,10 @@ download_windows() {
  # If any request is going to be blocked by Microsoft it's always this last one (the previous requests always seem to succeed)

  iso_url="https://www.microsoft.com/software-download-connector/api/GetProductDownloadLinksBySku?profile=$profile&ProductEditionId=undefined&SKU=$sku_id&friendlyFileName=undefined&Locale=en-US&sessionID=$session_id"
  iso_json=$(curl --silent --max-time 30 --request GET --user-agent "$user_agent" --referer "$url" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_url")
  iso_json=$(curl --silent --max-time 30 --request GET --user-agent "$user_agent" --referer "$url" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_url") || {
    handle_curl_error "$?" "Microsoft"
    return $?
  }

  if ! [ "$iso_json" ]; then
    # This should only happen if there's been some change to how this API works