Browse Source

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

Anael Ollier 10 năm trước cách đây
mục cha
commit
b2efb95f33
1 tập tin đã thay đổi với 8 bổ sung6 xóa
  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()) {