From db1fbdf8de7dca39037ff25322f3d936e9ba61b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20=C5=BDoljom?= Date: Thu, 11 Apr 2024 08:43:50 +0200 Subject: [PATCH] Fix the php executable to handle folder name with spaces As reported in https://github.com/beyondcode/herd-community/issues/631. Co-authored-by: Marcel Pociot <804684+mpociot@users.noreply.github.com> --- src/Process/Process.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Process/Process.php b/src/Process/Process.php index 4e72e58..a3b62c5 100644 --- a/src/Process/Process.php +++ b/src/Process/Process.php @@ -45,7 +45,7 @@ public function __construct($executable, array $arguments = array(), $stdInInput self::STDERR => array('pipe', self::WRITE), ); - $cmdLine = $executable . ' ' . implode(' ', array_map('escapeshellarg', $arguments)); + $cmdLine = '"' . $executable . '" ' . implode(' ', array_map('escapeshellarg', $arguments)); $this->process = proc_open($cmdLine, $descriptors, $pipes, null, null, array('bypass_shell' => true)); if ($this->process === false || $this->process === null) {