Skip to content

Commit bda5dce

Browse files
authored
Merge pull request #5 from linslin/master
#4 Fixed PCTNL exeption for windows environment
2 parents b960cfe + 51cb3d0 commit bda5dce

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Extension/PhiremockProcess.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class PhiremockProcess
4747
*/
4848
public function start($ip, $port, $path, $logsPath, $debug)
4949
{
50-
$phiremockPath = is_file($path) ? $path : "{$path}/phiremock";
50+
$phiremockPath = is_file($path) ? $path : "{$path}".DIRECTORY_SEPARATOR."phiremock";
5151
if ($debug) {
5252
echo 'Running ' . $this->getCommandPrefix()
5353
. "{$phiremockPath} -i {$ip} -p {$port}"
@@ -73,8 +73,10 @@ public function start($ip, $port, $path, $logsPath, $debug)
7373
*/
7474
public function stop()
7575
{
76-
$this->process->signal(SIGTERM);
77-
$this->process->stop(3, SIGKILL);
76+
if (!$this->isWindows()) {
77+
$this->process->signal(SIGTERM);
78+
$this->process->stop(3, SIGKILL);
79+
}
7880
}
7981

8082
/**

0 commit comments

Comments
 (0)