Browse Source

Check we have a driver before using it

Jordi Boggiano 13 years ago
parent
commit
22a93e7273
1 changed files with 4 additions and 0 deletions
  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();