Skip to content

Commit

Permalink
Print the upgrade table during upgrade --all (microsoft#1866)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedieaston authored Jan 22, 2022
1 parent 808e59b commit dc809d6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/AppInstallerCLICore/Commands/UpgradeCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ namespace AppInstaller::CLI
SearchSourceForMany <<
HandleSearchResultFailures <<
EnsureMatchesFromSearchResult(true) <<
ReportListResult(true) <<
UpdateAllApplicable;
}
else if (context.Args.Contains(Execution::Args::Type::Manifest))
Expand Down
9 changes: 7 additions & 2 deletions src/AppInstallerCLICore/Workflows/InstallFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/AppInstallerCLICore/Workflows/UpdateFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit dc809d6

Please sign in to comment.