From f17bbe77a499cb613097c963e95d3ec0a88b491b Mon Sep 17 00:00:00 2001 From: Easton Pillay Date: Tue, 19 Oct 2021 12:20:31 -0400 Subject: [PATCH] Added progress indication to InstallMultiplePackages. --- src/AppInstallerCLICore/Workflows/InstallFlow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp index 40a2bee916..bec2d79558 100644 --- a/src/AppInstallerCLICore/Workflows/InstallFlow.cpp +++ b/src/AppInstallerCLICore/Workflows/InstallFlow.cpp @@ -413,10 +413,16 @@ namespace AppInstaller::CLI::Workflow } bool allSucceeded = true; + size_t packagesCount = context.Get().size(); + size_t packagesProgress = 0; + for (auto package : context.Get()) { Logging::SubExecutionTelemetryScope subExecution{ package.PackageSubExecutionId }; + packagesProgress++; + context.Reporter.Info() << "(" << packagesProgress << "/" << packagesCount << ") "; + // We want to do best effort to install all packages regardless of previous failures auto installContextPtr = context.Clone(); Execution::Context& installContext = *installContextPtr;