feat: silence progress with --quiet
This commit is contained in:
@@ -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)*)) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user