commit dc809d6757156c4f4a268e976bb9276bdef71e26
parent 808e59b5d6ac3d40aca21a61d4976203376982c7
Author: Easton Pillay <easton@planeteaston.com>
Date: Fri, 21 Jan 2022 18:55:56 -0600
Print the upgrade table during `upgrade --all` (#1866)
Diffstat:
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git 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
@@ -191,7 +191,12 @@ namespace AppInstaller::CLI::Workflow
bool hasPackageAgreements = false;
for (auto& packageContext : context.Get<Execution::Data::PackagesToInstall>())
{
- // Show agreements for each package
+ // Show agreements for each package that has one
+ auto agreements = packageContext->Get<Execution::Data::Manifest>().CurrentLocalization.Get<AppInstaller::Manifest::Localization::Agreements>();
+ 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<Execution::Data::Manifest>().CurrentLocalization.Get<AppInstaller::Manifest::Localization::Agreements>().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
@@ -188,6 +188,7 @@ namespace AppInstaller::CLI::Workflow
else
{
context.Add<Execution::Data::PackagesToInstall>(std::move(packagesToInstall));
+ context.Reporter.Info() << std::endl;
context <<
InstallMultiplePackages(
Resource::String::InstallAndUpgradeCommandsReportDependencies,