From a5cefdc5b1d214d439aaee9e4204d008e09e3b11 Mon Sep 17 00:00:00 2001 From: Alessandro Chitolina Date: Sun, 4 May 2025 19:02:43 +0200 Subject: [PATCH] fix(build): take only the first line of which/where when searching for php executable --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 810c9065f3..715105833b 100644 --- a/build.rs +++ b/build.rs @@ -60,7 +60,7 @@ pub fn find_executable(name: &str) -> Option { let cmd = Command::new(WHICH).arg(name).output().ok()?; if cmd.status.success() { let stdout = String::from_utf8_lossy(&cmd.stdout); - Some(stdout.trim().into()) + stdout.trim().lines().next().map(|l| l.trim().into()) } else { None }