소스 검색

return false if local file path does not exist in GitDriver and HgDriver

kaktus42 10 년 전
부모
커밋
116ccdac62
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/Composer/Repository/Vcs/GitDriver.php
  2. 1 1
      src/Composer/Repository/Vcs/HgDriver.php

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

@@ -227,7 +227,7 @@ class GitDriver extends VcsDriver
         if (Filesystem::isLocalPath($url)) {
             $url = Filesystem::getPlatformPath($url);
             if (!is_dir($url)) {
-                throw new \RuntimeException('Directory does not exist: '.$url);
+                return false;
             }
 
             $process = new ProcessExecutor($io);

+ 1 - 1
src/Composer/Repository/Vcs/HgDriver.php

@@ -200,7 +200,7 @@ class HgDriver extends VcsDriver
         if (Filesystem::isLocalPath($url)) {
             $url = Filesystem::getPlatformPath($url);
             if (!is_dir($url)) {
-                throw new \RuntimeException('Directory does not exist: '.$url);
+                return false;
             }
 
             $process = new ProcessExecutor();