Skip to content

Commit 1ffd248

Browse files
committed
Auto merge of #6281 - ehuss:ci-progress, r=alexcrichton
Disable progress bar on CI. Due to the recent change (#6233) to use ansi escape codes to clear the progress bar, Travis logs are looking quite odd. Generally you don't want the progress bar during CI builds anyways, so just disable it if "CI" is set, which most of the CI services do.
2 parents 1f730be + f06a9e9 commit 1ffd248

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo/util/progress.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ struct Format {
3838
impl<'cfg> Progress<'cfg> {
3939
pub fn with_style(name: &str, style: ProgressStyle, cfg: &'cfg Config) -> Progress<'cfg> {
4040
// report no progress when -q (for quiet) or TERM=dumb are set
41+
// or if running on Continuous Integration service like Travis where the
42+
// output logs get mangled.
4143
let dumb = match env::var("TERM") {
4244
Ok(term) => term == "dumb",
4345
Err(_) => false,
4446
};
45-
if cfg.shell().verbosity() == Verbosity::Quiet || dumb {
47+
if cfg.shell().verbosity() == Verbosity::Quiet || dumb || env::var("CI").is_ok() {
4648
return Progress { state: None };
4749
}
4850

0 commit comments

Comments
 (0)