瀏覽代碼

Merge pull request #705 from stof/support_local_repo

Support local repo
Nils Adermann 13 年之前
父節點
當前提交
bac9d6d2e7
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Composer/Repository/Vcs/GitDriver.php

+ 2 - 1
src/Composer/Repository/Vcs/GitDriver.php

@@ -181,13 +181,14 @@ class GitDriver extends VcsDriver
      */
     public static function supports(IOInterface $io, $url, $deep = false)
     {
-        if (preg_match('#(^file://|^git://|\.git$|git@|//git\.|//github.com/)#i', $url)) {
+        if (preg_match('#(^git://|\.git$|git@|//git\.|//github.com/)#i', $url)) {
             return true;
         }
 
         // local filesystem
         if (static::isLocalUrl($url)) {
             $process = new ProcessExecutor();
+            $url = str_replace('file://', '', $url);
             // check whether there is a git repo in that path
             if ($process->execute('git tag', $output, $url) === 0) {
                 return true;