commit 26fc60d37521c31cc6fa06a9b40e8de14ae3ca5d
parent a46a21fe0e9d05e88cc0a400877c276e4152d8e1
Author: Luis Chacón <lechacon@users.noreply.github.com>
Date: Fri, 12 Mar 2021 21:59:03 -0800
Clone Reporter style (#795)
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git 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
@@ -131,6 +131,7 @@ namespace AppInstaller::CLI::Execution
std::ostream& m_out;
std::istream& m_in;
bool m_isVTEnabled = true;
+ std::optional<AppInstaller::Settings::VisualStyle> m_style;
std::optional<IndefiniteSpinner> m_spinner;
std::optional<ProgressBar> m_progressBar;
wil::srwlock m_progressCallbackLock;