Skip to content

Commit f06a9e9

Browse files
committed
Disable progress bar on CI.
1 parent 1f730be commit f06a9e9

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)