浏览代码

Fixed svn update command (fails before attempting to use authentication provided in auth.json)

Anael Ollier 10 年之前
父节点
当前提交
b2efb95f33
共有 1 个文件被更改,包括 8 次插入6 次删除
  1. 8 6
      src/Composer/Util/Svn.php

+ 8 - 6
src/Composer/Util/Svn.php

@@ -120,16 +120,18 @@ class Svn
             return $output;
         }
 
+        $errorOutput = $this->process->getErrorOutput();
         if (empty($output)) {
-            $output = $this->process->getErrorOutput();
+            $output = $errorOutput;
         }
+        $fullOutput = "$output\n$errorOutput";
 
         // the error is not auth-related
-        if (false === stripos($output, 'Could not authenticate to server:')
-            && false === stripos($output, 'authorization failed')
-            && false === stripos($output, 'svn: E170001:')
-            && false === stripos($output, 'svn: E215004:')) {
-            throw new \RuntimeException($output);
+        if (false === stripos($fullOutput, 'Could not authenticate to server:')
+            && false === stripos($fullOutput, 'authorization failed')
+            && false === stripos($fullOutput, 'svn: E170001:')
+            && false === stripos($fullOutput, 'svn: E215004:')) {
+            throw new \RuntimeException($fullOutput);
         }
 
         if (!$this->hasAuth()) {