From: dgellow Date: Fri, 27 Jan 2017 20:44:48 +0000 (+0100) Subject: directly print error only if there is more than one job in the queue X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~11^2~13^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a8a944c43dfd84f77a4314832b73486533ee5084;p=cargo.git directly print error only if there is more than one job in the queue --- diff --git a/src/cargo/ops/cargo_rustc/job_queue.rs b/src/cargo/ops/cargo_rustc/job_queue.rs index e7a242c55..7a380851e 100644 --- a/src/cargo/ops/cargo_rustc/job_queue.rs +++ b/src/cargo/ops/cargo_rustc/job_queue.rs @@ -182,15 +182,15 @@ impl<'a> JobQueue<'a> { match result { Ok(()) => self.finish(key, cx)?, Err(e) => { - handle_error(&*e, &mut *cx.config.shell()); - if self.active > 0 { + error = Some(human("build failed")); + handle_error(&*e, &mut *cx.config.shell()); cx.config.shell().say( "Build failed, waiting for other \ jobs to finish...", YELLOW)?; } if error.is_none() { - error = Some(human("build failed")); + error = Some(e); } } }