Set the CommandExecutor buildPath property when a build is created.

Closes #556
This commit is contained in:
nonlux 2015-02-23 14:40:20 +00:00 committed by Dan Cryer
parent 4905679298
commit 893deada33
3 changed files with 18 additions and 3 deletions

View file

@ -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'));

View file

@ -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;
}
}

View file

@ -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);
}