Make check for Pdepend output dir more robust. Before this fix, the pdepend module would check for "is_writable", which returns false even when the directory does not exist. I suggest to a) attempt to crete the dir if it does not exist, and b) make the error message more explanatory in case the dir cannot be created or is not accessible.
This commit is contained in:
parent
0887bd4bc4
commit
2672908225
|
@ -73,8 +73,11 @@ class Pdepend implements \PHPCI\Plugin
|
|||
*/
|
||||
public function execute()
|
||||
{
|
||||
if (!file_exists($this->location)) {
|
||||
mkdir($this->location);
|
||||
}
|
||||
if (!is_writable($this->location)) {
|
||||
throw new \Exception(sprintf('The location %s is not writable.', $this->location));
|
||||
throw new \Exception(sprintf('The location %s is not writable or does not exist.', $this->location));
|
||||
}
|
||||
|
||||
$pdepend = $this->phpci->findBinary('pdepend');
|
||||
|
|
Loading…
Reference in a new issue