Skip to content

Commit 46e32ca

Browse files
committed
Readded exec prefix
1 parent cb02ef7 commit 46e32ca

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/Extension/PhiremockProcess.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function stop()
7878
private function initProcess($ip, $port, $debug, $expectationsPath, $phiremockPath)
7979
{
8080
$commandline = [
81-
$phiremockPath,
81+
$this->getCommandPrefix() . $phiremockPath,
8282
'-i',
8383
$ip,
8484
'-p',
@@ -105,4 +105,20 @@ private function logPhiremockCommand($debug)
105105
echo 'Running ' . $this->process->getCommandLine() . PHP_EOL;
106106
}
107107
}
108+
109+
/**
110+
* @return string
111+
*/
112+
private function getCommandPrefix()
113+
{
114+
return $this->isWindows() ? '' : 'exec ';
115+
}
116+
117+
/**
118+
* @return bool
119+
*/
120+
private function isWindows()
121+
{
122+
return PHP_OS === 'WIN32' || PHP_OS === 'WINNT' || PHP_OS === 'Windows';
123+
}
108124
}

0 commit comments

Comments
 (0)