Added findBinary, fixes #115

This commit is contained in:
Dan Cryer 2013-10-08 08:50:10 +01:00
commit 0c8d9c0f74
12 changed files with 112 additions and 33 deletions

View file

@ -66,7 +66,14 @@ class Pdepend implements \PHPCI\Plugin
throw new \Exception(sprintf('The location %s is not writable.', $this->location));
}
$cmd = PHPCI_BIN_DIR . 'pdepend --summary-xml="%s" --jdepend-chart="%s" --overview-pyramid="%s" %s "%s"';
$pdepend = $this->phpci->findBinary('pdepend');
if (!$pdepend) {
$this->phpci->logFailure('Could not find pdepend.');
return false;
}
$cmd = $pdepend . ' --summary-xml="%s" --jdepend-chart="%s" --overview-pyramid="%s" %s "%s"';
$this->removeBuildArtifacts();