-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(#3613) Add source uri override for download uris #3615
Conversation
This adds a new Package Downloader class and have it call a resolve redirection for download URIs to the original source URI. This allows the same credentials to be used for the download URI as with the source URI when the server is configured to store binary files in a different location.
6e03fae
to
5c9e7c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor style thing. And a gripe about BOM and diff interfaces: I have no way of telling without a bunch of manual work if the files that got new copyright lines also changed their BOM/encoding like the csproj file 😬
src/chocolatey/infrastructure.app/nuget/ChocolateyNugetCredentialProvider.cs
Show resolved
Hide resolved
The ubuntu GHA is failing because mono isn't on that version anymore. Would we want to bring a maint commit that mirrors this one: ecd3e4e |
I plan to, but it won't be until after this PR (most likely). However, feel free to cherry-pick it into the hotfix branch if you want. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. All of the tests I put at it worked as expected.
Thanks for getting this updated @AdmiringWorm 👍 |
Description Of Changes
This adds a new Package Downloader class and have it call a resolve
redirection for download URIs to the original source URI.
This allows the same credentials to be used for the download URI as with
the source URI when the server is configured to store binary files in
a different location.
Motivation and Context
Without this change, it makes it impossible to install packages that have a download location that do not have the source URI as its prefix.
Testing
Operating Systems Testing
Change Types Made
Change Checklist
Related Issue