From 054f541d1c4e57cbff7b8289a97d8a87a779efbc Mon Sep 17 00:00:00 2001 From: Pavel Ivanov Date: Fri, 26 Mar 2021 12:24:19 +0300 Subject: [PATCH] fix: enable ansi colors if running in windows --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 0a203e97..0016570f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -270,6 +270,11 @@ fn run() -> Result<()> { Box::new(std::io::stdout()) }; + #[cfg(windows)] + if stdout_is_atty() { + let _ = ansi_term::enable_ansi_support(); + } + // Run the app. let run = || match app.run(input.as_mut(), output.as_mut()) { Ok(()) => Ok(()),