diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2024-06-29 07:27:25 +0000 |
|---|---|---|
| committer | Chris Denton <chris@chrisdenton.dev> | 2024-06-29 07:27:25 +0000 |
| commit | fa12064d6de52baeb3ca4f5fdc26828facb6c11c (patch) | |
| tree | f9f48dff696e6f5f1fdae289a03f8950d20b14bc /src/bootstrap | |
| parent | 9ed2ab3790ff41bf741dd690befd6a1c1e2b23ca (diff) | |
| download | rust-fa12064d6de52baeb3ca4f5fdc26828facb6c11c.tar.gz rust-fa12064d6de52baeb3ca4f5fdc26828facb6c11c.zip | |
Don't get output if `lldb --version` errors
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/build_steps/test.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 1ef5af7cc2d..55010f09049 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -7,6 +7,7 @@ use std::env; 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 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the 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 { |
