소스 검색

Output error if a local filesystem VCS repo points to a non-existing dir

Jordi Boggiano 13 년 전
부모
커밋
518984b70d
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/Composer/Repository/Vcs/GitDriver.php

+ 4 - 0
src/Composer/Repository/Vcs/GitDriver.php

@@ -191,6 +191,10 @@ class GitDriver extends VcsDriver
 
         // local filesystem
         if (static::isLocalUrl($url)) {
+            if (!is_dir($url)) {
+                throw new \RuntimeException('Directory does not exist: '.$url);
+            }
+
             $process = new ProcessExecutor();
             $url = str_replace('file://', '', $url);
             // check whether there is a git repo in that path