diff --git a/src/AppInstallerCLICore/ExecutionReporter.cpp b/src/AppInstallerCLICore/ExecutionReporter.cpp index 184ba2cb58..4e4bc298aa 100644 --- a/src/AppInstallerCLICore/ExecutionReporter.cpp +++ b/src/AppInstallerCLICore/ExecutionReporter.cpp @@ -32,6 +32,10 @@ namespace AppInstaller::CLI::Execution Reporter::Reporter(const Reporter& other, clone_t) : Reporter(other.m_out, other.m_in) { + if (other.m_style.has_value()) + { + SetStyle(*other.m_style); + } } OutputStream Reporter::GetOutputStream(Level level) @@ -78,6 +82,7 @@ namespace AppInstaller::CLI::Execution void Reporter::SetStyle(VisualStyle style) { + m_style = style; if (m_spinner) { m_spinner->SetStyle(style); diff --git a/src/AppInstallerCLICore/ExecutionReporter.h b/src/AppInstallerCLICore/ExecutionReporter.h index 559fdc3979..16ae7ba327 100644 --- a/src/AppInstallerCLICore/ExecutionReporter.h +++ b/src/AppInstallerCLICore/ExecutionReporter.h @@ -131,6 +131,7 @@ namespace AppInstaller::CLI::Execution std::ostream& m_out; std::istream& m_in; bool m_isVTEnabled = true; + std::optional m_style; std::optional m_spinner; std::optional m_progressBar; wil::srwlock m_progressCallbackLock;