Add a way to know if any branch failed loading

main
Jordi Boggiano 12 years ago
parent 61bd34df55
commit dae7f3cee7

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

Loading…
Cancel
Save