Skip to content

Commit fa12064

Browse files
committed
Don't get output if lldb --version errors
1 parent 9ed2ab3 commit fa12064

File tree

1 file changed

+4
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+4
-0
lines changed

src/bootstrap/src/core/build_steps/test.rs

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use std::env;
77
use std::ffi::OsStr;
88
use std::ffi::OsString;
99
use std::fs;
10+
use std::io::ErrorKind;
1011
use std::iter;
1112
use std::path::{Path, PathBuf};
1213
use std::process::{Command, Stdio};
@@ -1830,6 +1831,9 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
18301831
let lldb_version = Command::new(&lldb_exe)
18311832
.arg("--version")
18321833
.output()
1834+
.and_then(|output| {
1835+
if output.status.success() { Ok(output) } else { Err(ErrorKind::Other.into()) }
1836+
})
18331837
.map(|output| String::from_utf8_lossy(&output.stdout).to_string())
18341838
.ok();
18351839
if let Some(ref vers) = lldb_version {

0 commit comments

Comments
 (0)