diff --git a/doc/ReleaseNotes.md b/doc/ReleaseNotes.md index b325c92b48..646a18c170 100644 --- a/doc/ReleaseNotes.md +++ b/doc/ReleaseNotes.md @@ -38,5 +38,6 @@ The PowerShell module now automatically uses `GH_TOKEN` or `GITHUB_TOKEN` enviro ## Bug Fixes +* Fixed the `useLatest` property in the DSC v3 `Microsoft.WinGet/Package` resource schema to emit a boolean default (`false`) instead of the incorrect string `"false"`. * `SignFile` in `WinGetSourceCreator` now supports an optional RFC 3161 timestamp server via the new `TimestampServer` property on the `Signature` model. When set, `signtool.exe` is called with `/tr /td sha256`, embedding a countersignature timestamp so that signed packages remain valid after the signing certificate expires. * File and directory paths passed to `signtool.exe` and `makeappx.exe` are now quoted, fixing failures when paths contain spaces. diff --git a/src/AppInstallerCLICore/Commands/DscComposableObject.cpp b/src/AppInstallerCLICore/Commands/DscComposableObject.cpp index cb6be0898e..7f2f9525b8 100644 --- a/src/AppInstallerCLICore/Commands/DscComposableObject.cpp +++ b/src/AppInstallerCLICore/Commands/DscComposableObject.cpp @@ -65,7 +65,7 @@ namespace AppInstaller::CLI Json::ValueType type, std::string_view description, const std::vector& enumValues, - const std::optional& defaultValue) + const std::optional& defaultValue) { Json::Value& propertiesObject = object["properties"]; diff --git a/src/AppInstallerCLICore/Commands/DscComposableObject.h b/src/AppInstallerCLICore/Commands/DscComposableObject.h index 8e18a745d5..6563749768 100644 --- a/src/AppInstallerCLICore/Commands/DscComposableObject.h +++ b/src/AppInstallerCLICore/Commands/DscComposableObject.h @@ -45,7 +45,7 @@ namespace AppInstaller::CLI Json::ValueType type, std::string_view description, const std::vector& enumValues, - const std::optional& defaultValue); + const std::optional& defaultValue); } template @@ -224,7 +224,7 @@ namespace AppInstaller::CLI static std::string_view Name() { return _json_name_; } \ static Resource::LocString Description() { return _description_; } \ static std::vector EnumValues() { return std::vector _enum_vals_; } \ - static std::optional Default() { return _default_; } \ + static std::optional Default() { return _default_; } \ std::optional& _property_name_() { return m_value; } \ const std::optional& _property_name_() const { return m_value; } \ void _property_name_(std::optional value) { m_value = std::move(value); } \ diff --git a/src/AppInstallerCLICore/Commands/DscPackageResource.cpp b/src/AppInstallerCLICore/Commands/DscPackageResource.cpp index 7df2afcff3..7671af5210 100644 --- a/src/AppInstallerCLICore/Commands/DscPackageResource.cpp +++ b/src/AppInstallerCLICore/Commands/DscPackageResource.cpp @@ -22,7 +22,7 @@ namespace AppInstaller::CLI WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_FLAGS(SourceProperty, std::string, Source, "source", DscComposablePropertyFlag::CopyToOutput, Resource::String::DscResourcePropertyDescriptionPackageSource); WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY(VersionProperty, std::string, Version, "version", Resource::String::DscResourcePropertyDescriptionPackageVersion); WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_ENUM(MatchOptionProperty, std::string, MatchOption, "matchOption", Resource::String::DscResourcePropertyDescriptionPackageMatchOption, ({ "equals", "equalsCaseInsensitive", "startsWithCaseInsensitive", "containsCaseInsensitive" }), "equalsCaseInsensitive"); - WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_DEFAULT(UseLatestProperty, bool, UseLatest, "useLatest", Resource::String::DscResourcePropertyDescriptionPackageUseLatest, "false"); + WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_DEFAULT(UseLatestProperty, bool, UseLatest, "useLatest", Resource::String::DscResourcePropertyDescriptionPackageUseLatest, false); WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY_ENUM(InstallModeProperty, std::string, InstallMode, "installMode", Resource::String::DscResourcePropertyDescriptionPackageInstallMode, ({ "default", "silent", "interactive" }), "silent"); WINGET_DSC_DEFINE_COMPOSABLE_PROPERTY(AcceptAgreementsProperty, bool, AcceptAgreements, "acceptAgreements", Resource::String::DscResourcePropertyDescriptionAcceptAgreements);