Skip to content

Commit 78e7a51

Browse files
committed
Slightly improve error messages
* print "build failed" error to stderr * don't print "warning: warning:"
1 parent 235e2c2 commit 78e7a51

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

src/cargo/ops/cargo_doc.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ pub fn doc(manifest_path: &Path,
6161
match open_docs(&path) {
6262
Ok(m) => try!(shell.status("Launching", m)),
6363
Err(e) => {
64-
try!(shell.warn(
65-
"warning: could not determine a browser to open docs with, tried:"));
66-
for method in e {
67-
try!(shell.warn(format!("\t{}", method)));
68-
}
64+
let message = format!(
65+
"could not determine a browser to open docs with, tried:{}",
66+
e.into_iter().map(|method| format!("\n\t{}", method)).collect::<String>()
67+
);
68+
try!(shell.warn(message));
6969
}
7070
}
7171
}

src/cargo/ops/cargo_rustc/job_queue.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use std::fmt;
44
use std::sync::mpsc::{channel, Sender, Receiver};
55

66
use crossbeam::{self, Scope};
7-
use term::color::YELLOW;
87

98
use core::{PackageId, Target, Profile};
109
use util::{Config, DependencyQueue, Fresh, Dirty, Freshness};
@@ -147,9 +146,8 @@ impl<'a> JobQueue<'a> {
147146
}
148147
Err(e) => {
149148
if self.active > 0 {
150-
try!(config.shell().say(
151-
"Build failed, waiting for other \
152-
jobs to finish...", YELLOW));
149+
try!(config.shell().error(
150+
"build failed, waiting for other jobs to finish..."));
153151
for _ in self.rx.iter().take(self.active as usize) {}
154152
}
155153
return Err(e)

0 commit comments

Comments
 (0)