casey / intermodal

A command-line utility for BitTorrent torrent file creation, verification, and more
https://imdl.io
Creative Commons Zero v1.0 Universal
487 stars 25 forks source link

Suppress all output to stderr when `--quiet` is passed #473

Closed casey closed 4 years ago

casey commented 4 years ago

There are lots of places which do something like the following:

if !options.quiet {
  errln!(env, "Something!")?;
}

It might be better to just suppress all output to stderr when --quiet is passed.

This can be adding a quiet flag to OutputStream, which is set in Env::run with something like the following:

if args.options().quiet {
  self.err.set_quiet(true);
}

When OutputStream::quiet is true, all writes to that output stream are silently dropped.

Todo: