1
0
Fork 0

Add a way to know if any branch failed loading

pull/1288/head
Jordi Boggiano 2012-11-05 12:28:53 +01:00
parent 61bd34df55
commit dae7f3cee7
1 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,7 @@ class VcsRepository extends ArrayRepository
protected $type;
protected $loader;
protected $repoConfig;
protected $branchErrorOccurred = false;
public function __construct(array $repoConfig, IOInterface $io, Config $config, array $drivers = null)
{
@ -90,6 +91,11 @@ class VcsRepository extends ArrayRepository
}
}
public function hadInvalidBranches()
{
return $this->branchErrorOccurred;
}
protected function initialize()
{
parent::initialize();
@ -234,6 +240,7 @@ class VcsRepository extends ArrayRepository
if (!$verbose) {
$this->io->write('');
}
$this->branchErrorOccurred = true;
$this->io->write('Skipped branch '.$branch.', '.$e->getMessage());
$this->io->write('');
continue;