Fail hard instead of skipping branches/tags quietly when parsing VCS repos if 401/403 are returned, fixes #9087

main
Jordi Boggiano 4 years ago
parent 7bcde1481d
commit 12d6759888
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -265,6 +265,9 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
if ($e->getCode() === 404) {
$this->emptyReferences[] = $identifier;
}
if ($e->getCode() === 401 || $e->getCode() === 403) {
throw $e;
}
}
if ($isVeryVerbose) {
$this->io->writeError('<warning>Skipped tag '.$tag.', '.($e instanceof TransportException ? 'no composer file was found (' . $e->getCode() . ' HTTP status code)' : $e->getMessage()).'</warning>');
@ -350,6 +353,9 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
if ($e->getCode() === 404) {
$this->emptyReferences[] = $identifier;
}
if ($e->getCode() === 401 || $e->getCode() === 403) {
throw $e;
}
if ($isVeryVerbose) {
$this->io->writeError('<warning>Skipped branch '.$branch.', no composer file was found (' . $e->getCode() . ' HTTP status code)</warning>');
}

Loading…
Cancel
Save