Skip to content

Commit a8a944c

Browse files
committed
directly print error only if there is more than one job in the queue
1 parent c60a989 commit a8a944c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cargo/ops/cargo_rustc/job_queue.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ impl<'a> JobQueue<'a> {
182182
match result {
183183
Ok(()) => self.finish(key, cx)?,
184184
Err(e) => {
185-
handle_error(&*e, &mut *cx.config.shell());
186-
187185
if self.active > 0 {
186+
error = Some(human("build failed"));
187+
handle_error(&*e, &mut *cx.config.shell());
188188
cx.config.shell().say(
189189
"Build failed, waiting for other \
190190
jobs to finish...", YELLOW)?;
191191
}
192192
if error.is_none() {
193-
error = Some(human("build failed"));
193+
error = Some(e);
194194
}
195195
}
196196
}

0 commit comments

Comments
 (0)