winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit f6e27a48c32c4ccdc58f5f938c5bca5c54cef2dc
parent 6df6ded70ab3b558a54f764ba8ed47968350b37f
Author: Flor Chacón <14323496+florelis@users.noreply.github.com>
Date:   Wed, 31 Jul 2024 15:59:18 -0700

Fix downloader selection (#4696)

Resolves #4695
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/4696)
Diffstat:
M.github/actions/spelling/allow.txt | 1+
Msrc/AppInstallerCommonCore/NetworkSettings.cpp | 10+++++++---
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/.github/actions/spelling/allow.txt b/.github/actions/spelling/allow.txt @@ -17,6 +17,7 @@ appxsdk APSTUDIO ARRAYSIZE artifactstagingdirectory +Asn aspirational Authenticode AUTOLISTEN diff --git a/src/AppInstallerCommonCore/NetworkSettings.cpp b/src/AppInstallerCommonCore/NetworkSettings.cpp @@ -26,17 +26,21 @@ namespace AppInstaller::Settings InstallerDownloader NetworkSettings::GetInstallerDownloader() const { // The default is DeliveryOptimization. - // We only use WinINet if specified by settings, or if we want to use proxy (as DO does not support that) + // We use WinINet if specified by settings, or if we want to use proxy (as DO does not support that) InstallerDownloader setting = User().Get<Setting::NetworkDownloader>(); - if (setting != InstallerDownloader::WinInet && m_proxyUri) + if (m_proxyUri && setting != InstallerDownloader::WinInet) { AICLI_LOG(Core, Info, << "Forcing use of wininet for download as DO does not support proxy"); return InstallerDownloader::WinInet; } - else // Default or DO + else if (setting == InstallerDownloader::Default) { return InstallerDownloader::DeliveryOptimization; + } + else + { + return setting; } }