Explorar o código

Check we have a driver before using it

Jordi Boggiano %!s(int64=13) %!d(string=hai) anos
pai
achega
22a93e7273
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/Composer/Repository/VcsRepository.php

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

@@ -43,6 +43,10 @@ class VcsRepository extends ArrayRepository
             }
         }
 
+        if (!$driver) {
+            throw new \InvalidArgumentException('No driver found to handle VCS repository '.$this->url);
+        }
+
         $versionParser = new VersionParser;
         $loader = new ArrayLoader($this->repositoryManager);
         $versions = array();