Browse Source

Merge branch '1.8'

Jordi Boggiano 6 years ago
parent
commit
9d139cb694
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/Composer/Repository/VcsRepository.php

+ 4 - 2
src/Composer/Repository/VcsRepository.php

@@ -223,7 +223,7 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
 
                 $this->addPackage($this->loader->load($this->preProcess($driver, $data, $identifier)));
             } catch (\Exception $e) {
-                if ($e instanceof TransportException) {
+                if ($e instanceof TransportException && $e->getCode() === 404) {
                     $this->emptyReferences[] = $identifier;
                 }
                 if ($verbose) {
@@ -303,7 +303,9 @@ class VcsRepository extends ArrayRepository implements ConfigurableRepositoryInt
                 }
                 $this->addPackage($package);
             } catch (TransportException $e) {
-                $this->emptyReferences[] = $identifier;
+                if ($e->getCode() === 404) {
+                    $this->emptyReferences[] = $identifier;
+                }
                 if ($verbose) {
                     $this->io->writeError('<warning>Skipped branch '.$branch.', no composer file was found</warning>');
                 }