aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_project_model/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_project_model/src/lib.rs')
-rw-r--r--crates/ra_project_model/src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_project_model/src/lib.rs b/crates/ra_project_model/src/lib.rs
index 5a0a87ed7..3adb8baf6 100644
--- a/crates/ra_project_model/src/lib.rs
+++ b/crates/ra_project_model/src/lib.rs
@@ -600,7 +600,12 @@ pub fn get_rustc_cfg_options(target: Option<&String>) -> CfgOptions {
600fn output(mut cmd: Command) -> Result<Output> { 600fn output(mut cmd: Command) -> Result<Output> {
601 let output = cmd.output().with_context(|| format!("{:?} failed", cmd))?; 601 let output = cmd.output().with_context(|| format!("{:?} failed", cmd))?;
602 if !output.status.success() { 602 if !output.status.success() {
603 bail!("{:?} failed, {}", cmd, output.status) 603 match String::from_utf8(output.stderr) {
604 Ok(stderr) if !stderr.is_empty() => {
605 bail!("{:?} failed, {}\nstderr:\n{}", cmd, output.status, stderr)
606 }
607 _ => bail!("{:?} failed, {}", cmd, output.status),
608 }
604 } 609 }
605 Ok(output) 610 Ok(output)
606} 611}