mirror of
https://github.com/rust-lang/rust
synced 2024-10-06 08:40:35 +00:00
Don't get output if lldb --version
errors
This commit is contained in:
parent
9ed2ab3790
commit
fa12064d6d
|
@ -7,6 +7,7 @@
|
|||
use std::ffi::OsStr;
|
||||
use std::ffi::OsString;
|
||||
use std::fs;
|
||||
use std::io::ErrorKind;
|
||||
use std::iter;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{Command, Stdio};
|
||||
|
@ -1830,6 +1831,9 @@ fn run(self, builder: &Builder<'_>) {
|
|||
let lldb_version = Command::new(&lldb_exe)
|
||||
.arg("--version")
|
||||
.output()
|
||||
.and_then(|output| {
|
||||
if output.status.success() { Ok(output) } else { Err(ErrorKind::Other.into()) }
|
||||
})
|
||||
.map(|output| String::from_utf8_lossy(&output.stdout).to_string())
|
||||
.ok();
|
||||
if let Some(ref vers) = lldb_version {
|
||||
|
|
Loading…
Reference in a new issue