diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2018-03-28 17:25:09 +0200 |
|---|---|---|
| committer | Mark Simulacrum <mark.simulacrum@gmail.com> | 2018-04-03 11:43:14 -0600 |
| commit | 545b92f46d98bf5c812343315025bfb92f37837f (patch) | |
| tree | 921c05bb91a5f0c83f05bd4d17783c4eb0df94fa /src/bootstrap/lib.rs | |
| parent | a727447f5927ac0a186af4504f8a11014f42b1da (diff) | |
| download | rust-545b92f46d98bf5c812343315025bfb92f37837f.tar.gz rust-545b92f46d98bf5c812343315025bfb92f37837f.zip | |
Avoid printing output when in dry run mode
Diffstat (limited to 'src/bootstrap/lib.rs')
| -rw-r--r-- | src/bootstrap/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 7b37c9cefa5..c677d78d07b 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -667,6 +667,11 @@ impl Build { } } + fn info(&self, msg: &str) { + if self.config.dry_run { return; } + println!("{}", msg); + } + /// Returns the number of parallel jobs that have been configured for this /// build. fn jobs(&self) -> u32 { @@ -974,7 +979,7 @@ impl Build { pub fn fold_output<D, F>(&self, name: F) -> Option<OutputFolder> where D: Into<String>, F: FnOnce() -> D { - if self.ci_env == CiEnv::Travis { + if !self.config.dry_run && self.ci_env == CiEnv::Travis { Some(OutputFolder::new(name().into())) } else { None |
