Set the CommandExecutor buildPath property when a build is created.
Closes #556
This commit is contained in:
parent
4905679298
commit
893deada33
|
@ -296,6 +296,8 @@ class Builder implements LoggerAwareInterface
|
||||||
PHPCI_URL
|
PHPCI_URL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->commandExecutor->setBuildPath($this->buildPath);
|
||||||
|
|
||||||
// Create a working copy of the project:
|
// Create a working copy of the project:
|
||||||
if (!$this->build->createWorkingCopy($this, $this->buildPath)) {
|
if (!$this->build->createWorkingCopy($this, $this->buildPath)) {
|
||||||
throw new \Exception(Lang::get('could_not_create_working'));
|
throw new \Exception(Lang::get('could_not_create_working'));
|
||||||
|
|
|
@ -62,9 +62,7 @@ abstract class BaseCommandExecutor implements CommandExecutor
|
||||||
$this->logger = $logger;
|
$this->logger = $logger;
|
||||||
$this->quiet = $quiet;
|
$this->quiet = $quiet;
|
||||||
$this->verbose = $verbose;
|
$this->verbose = $verbose;
|
||||||
|
|
||||||
$this->lastOutput = array();
|
$this->lastOutput = array();
|
||||||
|
|
||||||
$this->rootDir = $rootDir;
|
$this->rootDir = $rootDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +90,7 @@ abstract class BaseCommandExecutor implements CommandExecutor
|
||||||
|
|
||||||
$pipes = array();
|
$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)) {
|
if (is_resource($process)) {
|
||||||
fclose($pipes[0]);
|
fclose($pipes[0]);
|
||||||
|
@ -219,4 +217,13 @@ abstract class BaseCommandExecutor implements CommandExecutor
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the buildPath property.
|
||||||
|
* @param string $path
|
||||||
|
*/
|
||||||
|
public function setBuildPath($path)
|
||||||
|
{
|
||||||
|
$this->buildPath = $path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,4 +30,10 @@ interface CommandExecutor
|
||||||
* @return null|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function findBinary($binary, $buildPath = null);
|
public function findBinary($binary, $buildPath = null);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the buildPath property.
|
||||||
|
* @param string $path
|
||||||
|
*/
|
||||||
|
public function setBuildPath($path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue