Skip to content

Commit d7e52f8

Browse files
zwirekmcustiel
authored andcommitted
fix for custom path (#26)
1 parent c5e3ea0 commit d7e52f8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Extension/Phiremock.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function startProcess()
7676
$this->process->start(
7777
$ip,
7878
$port,
79-
realpath($this->config['bin_path']),
79+
$this->getBinPath($this->config['bin_path']),
8080
realpath($this->config['logs_path']),
8181
$this->config['debug'],
8282
$this->config['expectations_path'] ? realpath($this->config['expectations_path']) : null
@@ -103,4 +103,14 @@ private function initProcess($process)
103103
{
104104
$this->process = null === $process ? new PhiremockProcess() : $process;
105105
}
106+
107+
private function getBinPath($path)
108+
{
109+
$currentDirectory = getcwd();
110+
chdir(Config::projectDir());
111+
$binPath = realpath($path);
112+
chdir($currentDirectory);
113+
114+
return $binPath;
115+
}
106116
}

0 commit comments

Comments
 (0)