Skip to content

Commit

Permalink
Fix binary when running via phpdbg
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Jun 17, 2017
1 parent a6bca0f commit 39664d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Process/ChannelledProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class ChannelledProcess implements ProcessContext, Strand {
* @param mixed[] $env Array of environment variables.
*/
public function __construct(string $path, string $cwd = "", array $env = []) {
$command = \PHP_BINARY . " " . \escapeshellarg($path);
$binary = \PHP_SAPI === "phpdbg" ? \PHP_BINARY . " -qrr --" : \PHP_BINARY;
$command = $binary . " " . \escapeshellarg($path);
$this->process = new Process($command, $cwd, $env);
}

Expand Down

0 comments on commit 39664d4

Please sign in to comment.