Skip to content

Commit 78d2499

Browse files
authored
fix(build): take only the first line of which/where when searching for php executable
In windows, where command can return more than one line Refs: #430
1 parent 30fd19f commit 78d2499

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub fn find_executable(name: &str) -> Option<PathBuf> {
6060
let cmd = Command::new(WHICH).arg(name).output().ok()?;
6161
if cmd.status.success() {
6262
let stdout = String::from_utf8_lossy(&cmd.stdout);
63-
Some(stdout.trim().into())
63+
stdout.trim().lines().next().map(|l| l.trim().into())
6464
} else {
6565
None
6666
}

0 commit comments

Comments
 (0)