From 12135f7de1e3a3b1e094ea1fd4a4fecc87592332 Mon Sep 17 00:00:00 2001 From: Kaleb Luedtke Date: Fri, 10 Oct 2025 11:36:14 -0500 Subject: [PATCH 1/3] Allow suppressing configuration output on test --- src/AppInstallerCLICore/Commands/ConfigureTestCommand.cpp | 1 + src/AppInstallerCLICore/Workflows/ConfigurationFlow.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AppInstallerCLICore/Commands/ConfigureTestCommand.cpp b/src/AppInstallerCLICore/Commands/ConfigureTestCommand.cpp index 1a09ff4c8e..2369879646 100644 --- a/src/AppInstallerCLICore/Commands/ConfigureTestCommand.cpp +++ b/src/AppInstallerCLICore/Commands/ConfigureTestCommand.cpp @@ -17,6 +17,7 @@ namespace AppInstaller::CLI Argument{ Execution::Args::Type::ConfigurationModulePath, Resource::String::ConfigurationModulePath, ArgumentType::Positional }, Argument{ Execution::Args::Type::ConfigurationProcessorPath, Resource::String::ConfigurationProcessorPath, ArgumentType::Standard, Argument::Visibility::Help }, Argument{ Execution::Args::Type::ConfigurationHistoryItem, Resource::String::ConfigurationHistoryItemArgumentDescription, ArgumentType::Standard, Argument::Visibility::Help }, + Argument{ Execution::Args::Type::ConfigurationSuppressPrologue, Resource::String::ConfigurationSuppressPrologueArgumentDescription, ArgumentType::Flag, Argument::Visibility::Help }, Argument{ Execution::Args::Type::ConfigurationAcceptWarning, Resource::String::ConfigurationAcceptWarningArgumentDescription, ArgumentType::Flag }, }; } diff --git a/src/AppInstallerCLICore/Workflows/ConfigurationFlow.cpp b/src/AppInstallerCLICore/Workflows/ConfigurationFlow.cpp index 055e8fca84..3a0a6d70be 100644 --- a/src/AppInstallerCLICore/Workflows/ConfigurationFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/ConfigurationFlow.cpp @@ -1977,7 +1977,7 @@ namespace AppInstaller::CLI::Workflow auto getDetailsOperation = configContext.Processor().GetSetDetailsAsync(configContext.Set(), ConfigurationUnitDetailFlags::ReadOnly); auto unification = anon::CreateProgressCancellationUnification(std::move(progressScope), getDetailsOperation); - bool suppressDetailsOutput = context.Args.Contains(Args::Type::ConfigurationAcceptWarning) && context.Args.Contains(Args::Type::ConfigurationSuppressPrologue); + bool suppressDetailsOutput = context.Args.Contains(Args::Type::ConfigurationSuppressPrologue); anon::OutputHelper outputHelper{ context }; uint32_t unitsShown = 0; From 1737cf99947a66a6fb6833950fcf9c75fd3eccdb Mon Sep 17 00:00:00 2001 From: Kaleb Luedtke Date: Fri, 10 Oct 2025 11:53:39 -0500 Subject: [PATCH 2/3] Add e2e test --- src/AppInstallerCLIE2ETests/ConfigureTestCommand.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/AppInstallerCLIE2ETests/ConfigureTestCommand.cs b/src/AppInstallerCLIE2ETests/ConfigureTestCommand.cs index a33a356bbd..8589f5ff76 100644 --- a/src/AppInstallerCLIE2ETests/ConfigureTestCommand.cs +++ b/src/AppInstallerCLIE2ETests/ConfigureTestCommand.cs @@ -49,6 +49,7 @@ public void ConfigureTest_NotInDesiredState() var result = TestCommon.RunAICLICommand(CommandAndAgreements, TestCommon.GetTestDataFile("Configuration\\Configure_TestRepo.yml")); Assert.AreEqual(Constants.ErrorCode.S_FALSE, result.ExitCode); Assert.True(result.StdOut.Contains("System is not in the described configuration state.")); + Assert.True(result.StdOut.Contains("Module: xE2ETestResource")); // Details from the resource should appear if the initial details are shown } /// @@ -66,6 +67,7 @@ public void ConfigureTest_InDesiredState() var result = TestCommon.RunAICLICommand(CommandAndAgreements, TestCommon.GetTestDataFile("Configuration\\Configure_TestRepo.yml")); Assert.AreEqual(Constants.ErrorCode.S_OK, result.ExitCode); Assert.True(result.StdOut.Contains("System is in the described configuration state.")); + Assert.True(result.StdOut.Contains("Module: xE2ETestResource")); // Details from the resource should appear if the initial details are shown } /// @@ -126,6 +128,17 @@ public void ConfigureTest_DSCv3() Assert.True(result.StdOut.Contains("System is not in the described configuration state.")); } + /// + /// Tests that --suppress-initial-details will suppress the initial details output. + /// + [Test] + public void ConfigureTest_SuppressInitialDetails() + { + var result = TestCommon.RunAICLICommand("configure --accept-configuration-agreements --suppress-initial-details", TestCommon.GetTestDataFile("Configuration\\Configure_TestRepo.yml")); + Assert.AreEqual(0, result.ExitCode); + Assert.False(result.StdOut.Contains("Module: xE2ETestResource")); // Details from the resource should not appear if the initial details are suppressed + } + private void DeleteResourceArtifacts() { // Delete all .txt files in the test directory; they are placed there by the tests From e8b0136b1485a73a5c7b44c7fdbdc65f275ab747 Mon Sep 17 00:00:00 2001 From: Kaleb Luedtke Date: Tue, 14 Oct 2025 20:34:08 -0500 Subject: [PATCH 3/3] Update release notes --- doc/ReleaseNotes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/ReleaseNotes.md b/doc/ReleaseNotes.md index 8ec1e210c6..c5acaf58a1 100644 --- a/doc/ReleaseNotes.md +++ b/doc/ReleaseNotes.md @@ -1,3 +1,7 @@ ## New in v1.28 + +## Bug Fixes +* `--suppress-initial-details` now works with `winget configure test` +* `--suppress-initial-details` no longer requires `--accept-configuration-agreements`