run panics if lldb is not installed and no output is produced..
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Thu, 13 Jun 2024 09:16:40 +0000 (11:16 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Thu, 27 Jun 2024 12:30:53 +0000 (14:30 +0200)
Forwarded: no

Gbp-Pq: Topic build
Gbp-Pq: Name d-armel-fix-lldb.patch

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

index 2b8f1d161cf63c1d4385b5158349e22ad4e5881c..bb572db92404db07f62c9aeffa81cbc625a9a7a2 100644 (file)
@@ -1935,7 +1935,11 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
             .ok();
         if let Some(ref vers) = lldb_version {
             cmd.arg("--lldb-version").arg(vers);
-            let lldb_python_dir = run(Command::new(lldb_exe).arg("-P")).ok();
+            let lldb_python_dir = Command::new(lldb_exe)
+                .arg("-P")
+                .output()
+                .map(|output| String::from_utf8_lossy(&output.stdout).to_string())
+                .ok();
             if let Some(ref dir) = lldb_python_dir {
                 cmd.arg("--lldb-python-dir").arg(dir);
             }