made non-terminal default to quiet

This commit is contained in:
Valerie Wolfe 2024-08-28 19:19:58 -04:00
parent ca75ff1260
commit 27abd81bf8

View file

@ -4,6 +4,7 @@ use std::{
stdin, stdin,
stdout, stdout,
IsTerminal,
Write Write
}, },
process::exit process::exit
@ -42,7 +43,7 @@ fn main() {
} }
let mut context = util::build_context(&mut args); 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 // collect args and evaluate if present
let expressions = args.finish(); let expressions = args.finish();