From 4e05b9f05098522f51ca9ed70fa6ed920af40f57 Mon Sep 17 00:00:00 2001 From: Linfeng Qian Date: Sun, 27 Oct 2024 10:58:47 +0800 Subject: [PATCH] Auto color output --- src/color.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/color.rs b/src/color.rs index 320029c..2cd515a 100644 --- a/src/color.rs +++ b/src/color.rs @@ -20,8 +20,8 @@ pub fn build_spec(fg: Option, bold: bool) -> ColorSpec { impl Printer { pub fn new() -> Printer { Printer { - outwriter: BufferWriter::stdout(ColorChoice::Always), - errwriter: BufferWriter::stderr(ColorChoice::Always), + outwriter: BufferWriter::stdout(ColorChoice::Auto), + errwriter: BufferWriter::stderr(ColorChoice::Auto), } }