Browse Source

Merge pull request #2 from simensen/svn-auth-reloaded-supports-auth-check

Svn auth reloaded supports auth check
Till Klampaeckel 13 years ago
parent
commit
de3be2c1ef
1 changed files with 10 additions and 1 deletions
  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;
     }
 
     /**