mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Do not consider LLDB version to be valid if it is empty
When dry run is enabled, the command for finding LLDB version would succeed, but return an empty string. This was inadvertently enabling a code path that should only be executed when the LLDB is actually present and its version is valid. This commit makes sure that if the version is empty, LLDB will be considered not found.
This commit is contained in:
parent
54952b4445
commit
c198c0e6d0
@ -1805,14 +1805,9 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
|
||||
|
||||
let lldb_exe = builder.config.lldb.clone().unwrap_or_else(|| PathBuf::from("lldb"));
|
||||
let lldb_version = builder
|
||||
.run(
|
||||
BootstrapCommand::new(&lldb_exe)
|
||||
.capture()
|
||||
.allow_failure()
|
||||
.run_always()
|
||||
.arg("--version"),
|
||||
)
|
||||
.stdout_if_ok();
|
||||
.run(BootstrapCommand::new(&lldb_exe).capture().allow_failure().arg("--version"))
|
||||
.stdout_if_ok()
|
||||
.and_then(|v| if v.trim().is_empty() { None } else { Some(v) });
|
||||
if let Some(ref vers) = lldb_version {
|
||||
cmd.arg("--lldb-version").arg(vers);
|
||||
let lldb_python_dir = builder
|
||||
|
Loading…
Reference in New Issue
Block a user