Merge pull request #1 from Block8/master

Build::removeBuildDirectory: do not try to remove build directory of not...
This commit is contained in:
Adam Henley 2015-04-26 14:44:20 +12:00
commit 6919e9b7ff

View file

@ -221,10 +221,13 @@ class Build extends BuildBase
/**
* Return the path to run this build into.
*
* @return string
* @return string|null
*/
public function getBuildPath()
{
if (!$this->getId()) {
return null;
}
return PHPCI_BUILD_ROOT_DIR . $this->getId();
}
@ -235,7 +238,7 @@ class Build extends BuildBase
{
$buildPath = $this->getBuildPath();
if (!is_dir($buildPath)) {
if (!$buildPath || !is_dir($buildPath)) {
return;
}