浏览代码

Handle auth challenge in SvnDriver supports.

Beau Simensen 13 年之前
父节点
当前提交
a6366be5a6
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      src/Composer/Repository/Vcs/SvnDriver.php

+ 10 - 1
src/Composer/Repository/Vcs/SvnDriver.php

@@ -262,7 +262,16 @@ class SvnDriver extends VcsDriver
             $ignoredOutput
         );
 
-        return $exit === 0;
+        if ($exit === 0) {
+            // This is definitely a Subversion repository.
+            return true;
+        }
+        if (preg_match('/authorization failed/i', $processExecutor->getErrorOutput())) {
+            // This is likely a remote Subversion repository that requires
+            // authentication. We will handle actual authentication later.
+            return true;
+        }
+        return false;
     }
 
     /**