Skip to content

Commit

Permalink
Revise the repair success message for installer type repair
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhusudhan-MSFT committed Feb 18, 2024
1 parent efdf8b2 commit 0679c9b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/AppInstallerCLICore/Workflows/InstallFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ namespace AppInstaller::CLI::Workflow

void ReportInstallerResult::operator()(Execution::Context& context) const
{
bool isRepair = WI_IsFlagSet(context.GetFlags(), Execution::ContextFlag::InstallerExecutionUseRepair);

DWORD installResult = context.Get<Execution::Data::OperationReturnCode>();
const auto& additionalSuccessCodes = context.Get<Execution::Data::Installer>()->InstallerSuccessCodes;
if (installResult != 0 && (std::find(additionalSuccessCodes.begin(), additionalSuccessCodes.end(), installResult) == additionalSuccessCodes.end()))
Expand Down Expand Up @@ -507,7 +509,7 @@ namespace AppInstaller::CLI::Workflow
{
const auto& manifest = context.Get<Execution::Data::Manifest>();

if (WI_IsFlagSet(context.GetFlags(), Execution::ContextFlag::InstallerExecutionUseRepair))
if (isRepair)
{
Logging::Telemetry().LogRepairFailure(manifest.Id, manifest.Version, m_installerType, installResult);
}
Expand Down Expand Up @@ -541,7 +543,15 @@ namespace AppInstaller::CLI::Workflow
}
else
{
context.Reporter.Info() << Resource::String::InstallFlowInstallSuccess << std::endl;
if (isRepair)
{
context.Reporter.Info() << Resource::String::RepairFlowRepairSuccess << std::endl;
}
else
{
context.Reporter.Info() << Resource::String::InstallFlowInstallSuccess << std::endl;
}

}
}

Expand Down

0 comments on commit 0679c9b

Please sign in to comment.