Skip to content

Commit

Permalink
Disable progress bar on CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Nov 7, 2018
1 parent 1f730be commit f06a9e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cargo/util/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ struct Format {
impl<'cfg> Progress<'cfg> {
pub fn with_style(name: &str, style: ProgressStyle, cfg: &'cfg Config) -> Progress<'cfg> {
// report no progress when -q (for quiet) or TERM=dumb are set
// or if running on Continuous Integration service like Travis where the
// output logs get mangled.
let dumb = match env::var("TERM") {
Ok(term) => term == "dumb",
Err(_) => false,
};
if cfg.shell().verbosity() == Verbosity::Quiet || dumb {
if cfg.shell().verbosity() == Verbosity::Quiet || dumb || env::var("CI").is_ok() {
return Progress { state: None };
}

Expand Down

0 comments on commit f06a9e9

Please sign in to comment.