winget-cli

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

commit a36a63286d106c8c35557f307e5df8abc5ebdf1c
parent 6dc9b2c5881724e3ff9778fc580f440f3392a020
Author: yao-msft <50888816+yao-msft@users.noreply.github.com>
Date:   Mon,  2 Oct 2023 19:21:02 -0700

Platform source should not be blocked by policy check (#3725)


Diffstat:
Msrc/AppInstallerCLITests/Sources.cpp | 7+++++++
Msrc/AppInstallerRepositoryCore/SourcePolicy.cpp | 3+++
2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/AppInstallerCLITests/Sources.cpp b/src/AppInstallerCLITests/Sources.cpp @@ -1294,3 +1294,9 @@ TEST_CASE("RepoSources_GroupPolicy_BypassCertificatePinningForMicrosoftStore", " REQUIRE_FALSE(source.GetDetails().CertificatePinningConfiguration.IsEmpty()); } } + +TEST_CASE("RepoSources_BuiltInDesktopFrameworkSourceAlwaysCreatable", "[sources]") +{ + Source source(WellKnownSource::DesktopFrameworks); + REQUIRE(source); +}+ \ No newline at end of file diff --git a/src/AppInstallerRepositoryCore/SourcePolicy.cpp b/src/AppInstallerRepositoryCore/SourcePolicy.cpp @@ -173,6 +173,9 @@ namespace AppInstaller::Repository return IsDefaultSourceEnabled(source, ExperimentalFeature::Feature::None, onlyExplicit, TogglePolicy::Policy::DefaultSource); case AppInstaller::Repository::WellKnownSource::MicrosoftStore: return IsDefaultSourceEnabled(source, ExperimentalFeature::Feature::None, onlyExplicit, TogglePolicy::Policy::MSStoreSource); + case AppInstaller::Repository::WellKnownSource::DesktopFrameworks: + // No corresponding policy available for this source. + return true; } return false;