Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## New in v1.28

<!-- Nothing yet! -->

## Bug Fixes
* `--suppress-initial-details` now works with `winget configure test`
* `--suppress-initial-details` no longer requires `--accept-configuration-agreements`
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/AppInstallerCLICore/Workflows/ConfigurationFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
13 changes: 13 additions & 0 deletions src/AppInstallerCLIE2ETests/ConfigureTestCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/// <summary>
Expand All @@ -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
}

/// <summary>
Expand Down Expand Up @@ -126,6 +128,17 @@ public void ConfigureTest_DSCv3()
Assert.True(result.StdOut.Contains("System is not in the described configuration state."));
}

/// <summary>
/// Tests that --suppress-initial-details will suppress the initial details output.
/// </summary>
[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
Expand Down