projects
/
cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eeb724d
)
Don't print a progress bar in quiet mode
author
Alex Crichton
<alex@alexcrichton.com>
Sat, 16 Dec 2017 15:22:51 +0000
(07:22 -0800)
committer
Alex Crichton
<alex@alexcrichton.com>
Sat, 16 Dec 2017 15:22:51 +0000
(07:22 -0800)
Closes #4825
src/cargo/util/progress.rs
patch
|
blob
|
history
diff --git
a/src/cargo/util/progress.rs
b/src/cargo/util/progress.rs
index c4a3e03e6ac928625e16653cbdd74cea089ef346..21cf0acfa902a589769b71855992e54838c163b4 100644
(file)
--- a/
src/cargo/util/progress.rs
+++ b/
src/cargo/util/progress.rs
@@
-2,6
+2,7
@@
use std::cmp;
use std::iter;
use std::time::{Instant, Duration};
+use core::shell::Verbosity;
use util::{Config, CargoResult};
pub struct Progress<'cfg> {
@@
-19,6
+20,11
@@
struct State<'cfg> {
impl<'cfg> Progress<'cfg> {
pub fn new(name: &str, cfg: &'cfg Config) -> Progress<'cfg> {
+ // no progress if `-q` is passed as, well, we're supposed to be quiet
+ if cfg.shell().verbosity() == Verbosity::Quiet {
+ return Progress { state: None }
+ }
+
Progress {
state: cfg.shell().err_width().map(|n| {
State {