feat: silence progress with --quiet

This commit is contained in:
2026-09-08 14:16:08 +00:00
parent cabbbde438
commit 61f35f5ae4
9 changed files with 67 additions and 45 deletions

View File

@@ -1,9 +1,13 @@
// progress and warnings go to stderr, so what a caller pipes is only ever the
// data a command was asked for
// progress, on stderr and only when it was asked for
macro_rules! note {
($($arg:tt)*) => { eprintln!($($arg)*) };
($ctx:expr, $($arg:tt)*) => {
if !$ctx.quiet {
eprintln!($($arg)*)
}
};
}
// not progress: it speaks about the result, so --quiet keeps it
macro_rules! warning {
($($arg:tt)*) => { eprintln!("warning: {}", format_args!($($arg)*)) };
}