diff --git a/PHPCI/Builder.php b/PHPCI/Builder.php index 904aa506..d911e04b 100644 --- a/PHPCI/Builder.php +++ b/PHPCI/Builder.php @@ -296,6 +296,8 @@ class Builder implements LoggerAwareInterface PHPCI_URL ); + $this->commandExecutor->setBuildPath($this->buildPath); + // Create a working copy of the project: if (!$this->build->createWorkingCopy($this, $this->buildPath)) { throw new \Exception(Lang::get('could_not_create_working')); diff --git a/PHPCI/Helper/BaseCommandExecutor.php b/PHPCI/Helper/BaseCommandExecutor.php index 28247ebc..4c2f1fa8 100644 --- a/PHPCI/Helper/BaseCommandExecutor.php +++ b/PHPCI/Helper/BaseCommandExecutor.php @@ -62,9 +62,7 @@ abstract class BaseCommandExecutor implements CommandExecutor $this->logger = $logger; $this->quiet = $quiet; $this->verbose = $verbose; - $this->lastOutput = array(); - $this->rootDir = $rootDir; } @@ -92,7 +90,7 @@ abstract class BaseCommandExecutor implements CommandExecutor $pipes = array(); - $process = proc_open($command, $descriptorSpec, $pipes, dirname($this->buildPath), null); + $process = proc_open($command, $descriptorSpec, $pipes, $this->buildPath, null); if (is_resource($process)) { fclose($pipes[0]); @@ -219,4 +217,13 @@ abstract class BaseCommandExecutor implements CommandExecutor } return null; } + + /** + * Set the buildPath property. + * @param string $path + */ + public function setBuildPath($path) + { + $this->buildPath = $path; + } } diff --git a/PHPCI/Helper/CommandExecutor.php b/PHPCI/Helper/CommandExecutor.php index d83f0c6b..bacd1a2e 100644 --- a/PHPCI/Helper/CommandExecutor.php +++ b/PHPCI/Helper/CommandExecutor.php @@ -30,4 +30,10 @@ interface CommandExecutor * @return null|string */ public function findBinary($binary, $buildPath = null); + + /** + * Set the buildPath property. + * @param string $path + */ + public function setBuildPath($path); }