From dc809d6757156c4f4a268e976bb9276bdef71e26 Mon Sep 17 00:00:00 2001 From: Easton Pillay Date: Fri, 21 Jan 2022 18:55:56 -0600 Subject: [PATCH] Print the upgrade table during `upgrade --all` (#1866) --- src/AppInstallerCLICore/Commands/UpgradeCommand.cpp | 1 + src/AppInstallerCLICore/Workflows/InstallFlow.cpp | 9 +++++++-- src/AppInstallerCLICore/Workflows/UpdateFlow.cpp | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp b/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp index 9a0b182690..5ee1772210 100644 --- a/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp +++ b/src/AppInstallerCLICore/Commands/UpgradeCommand.cpp @@ -155,6 +155,7 @@ namespace AppInstaller::CLI SearchSourceForMany << HandleSearchResultFailures << EnsureMatchesFromSearchResult(true) << + ReportListResult(true) << UpdateAllApplicable; } else if (context.Args.Contains(Execution::Args::Type::Manifest)) diff --git a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp index 7f3712e4e1..ebd5154f42 100644 --- a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp @@ -191,7 +191,12 @@ namespace AppInstaller::CLI::Workflow bool hasPackageAgreements = false; for (auto& packageContext : context.Get()) { - // Show agreements for each package + // Show agreements for each package that has one + auto agreements = packageContext->Get().CurrentLocalization.Get(); + if (agreements.empty()) + { + continue; + } Execution::Context& showContext = *packageContext; auto previousThreadGlobals = showContext.SetForCurrentThread(); @@ -203,7 +208,7 @@ namespace AppInstaller::CLI::Workflow AICLI_TERMINATE_CONTEXT(showContext.GetTerminationHR()); } - hasPackageAgreements |= !showContext.Get().CurrentLocalization.Get().empty(); + hasPackageAgreements |= true; } // If any package has agreements, ensure they are accepted diff --git a/src/AppInstallerCLICore/Workflows/UpdateFlow.cpp b/src/AppInstallerCLICore/Workflows/UpdateFlow.cpp index 861d97f42c..169b49b338 100644 --- a/src/AppInstallerCLICore/Workflows/UpdateFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/UpdateFlow.cpp @@ -188,6 +188,7 @@ namespace AppInstaller::CLI::Workflow else { context.Add(std::move(packagesToInstall)); + context.Reporter.Info() << std::endl; context << InstallMultiplePackages( Resource::String::InstallAndUpgradeCommandsReportDependencies,