Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print the upgrade table during upgrade --all #1866

Merged
merged 2 commits into from
Jan 22, 2022
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
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