winget-cli

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

commit 878fcdc66041e48ccfc0bdf0c87cb32126ca32ea
parent 9d30e9f89595c612700d2d959232b1f8b633873e
Author: yao-msft <50888816+yao-msft@users.noreply.github.com>
Date:   Tue, 11 Oct 2022 14:59:32 -0700

Always fall back on streaming failure (#2590)


Diffstat:
Msrc/AppInstallerCLICore/Workflows/DownloadFlow.cpp | 14+++-----------
1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp b/src/AppInstallerCLICore/Workflows/DownloadFlow.cpp @@ -297,18 +297,10 @@ namespace AppInstaller::CLI::Workflow context.Add<Execution::Data::HashPair>(std::make_pair(installer.SignatureSha256, signatureHash)); } - catch (const winrt::hresult_error& e) + catch (...) { - if (static_cast<HRESULT>(e.code()) == HRESULT_FROM_WIN32(ERROR_NO_RANGES_PROCESSED) || - HRESULT_FACILITY(e.code()) == FACILITY_HTTP) - { - // Failed to get signature hash through HttpStream, use download - downloadInstead = true; - } - else - { - throw; - } + AICLI_LOG(CLI, Info, << "Failed to get msix signature hash, fall back to direct download."); + downloadInstead = true; } if (downloadInstead)