From 27abd81bf895aa875f7be34b7fce5a3cd2fb8948 Mon Sep 17 00:00:00 2001 From: Valerie Date: Wed, 28 Aug 2024 19:19:58 -0400 Subject: [PATCH] made non-terminal default to quiet --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 5506278..4e94690 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,7 @@ use std::{ stdin, stdout, + IsTerminal, Write }, process::exit @@ -42,7 +43,7 @@ fn main() { } let mut context = util::build_context(&mut args); - let quiet = args.contains(flag::QUIET); + let quiet = args.contains(flag::QUIET) || !stdout().is_terminal(); // collect args and evaluate if present let expressions = args.finish();