Skip to content

Conversation

Copy link
Contributor

CopilotAI commented Dec 4, 2025

When downloading product version files from a custom feed that returns redirects, curl doesn't follow them because the -L flag is missing. This causes get_specific_product_version to return an empty string, and the script erroneously succeeds by finding an empty version directory.

Changes

  • Add -L flag to curl in get_specific_product_version function to follow redirects
# Before curl -s --fail "${download_link}${feed_credential}"# After curl -sL --fail "${download_link}${feed_credential}"

This aligns with other curl usages in the script (downloadcurl, get_http_header_curl) which already use -L.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 1s1vsblobprodcus386.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • 4vyvsblobprodcus361.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • c50vsblobprodcus330.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • e7bvsblobprodcus348.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • ofvvsblobprodcus315.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • p2ovsblobprodcus312.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • sc4vsblobprodcus331.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)
  • u3hvsblobprodcus371.vsblob.vsassets.io
    • Triggering command: /usr/bin/dotnet dotnet restore (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>dotnet-install does not handle redirects when downloading the product version files</issue_title>
<issue_description>When downloading the product version files, the curl command doesn't follow redirects. We've seen this with a custom feed. In this case, get_specific_product_version returns an empty string. The script also erroneously succeeds when this happens. The specific version ends up empty, and then the check for whether the version already exists succeeds. It finds <install location>/shared/Microsoft.NETCore.App/ (empty version directory).</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAI changed the title [WIP] Fix curl command to handle redirects in dotnet-installFix curl not following redirects when downloading product version filesDec 4, 2025
CopilotAI requested a review from mmitcheDecember 4, 2025 21:52
@marcpopMSFTmarcpopMSFT marked this pull request as ready for review December 4, 2025 23:05
@marcpopMSFTmarcpopMSFT requested a review from a team as a code ownerDecember 4, 2025 23:05
@mmitchemmitche merged commit c96e3b5 into mainDec 5, 2025
5 checks passed
@github-project-automationgithub-project-automationbot moved this from Backlog to Done in .NET Install ScriptsDec 5, 2025
@baronfelbaronfel deleted the copilot/fix-curl-redirect-handling branch December 5, 2025 16:37
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

dotnet-install does not handle redirects when downloading the product version files

3 participants

@ellahathaway@mmitche