From b2efb95f3323266d7646dca5210b30c098e0d5cb Mon Sep 17 00:00:00 2001 From: Anael Ollier Date: Mon, 27 Apr 2015 15:26:32 +0200 Subject: [PATCH] Fixed svn update command (fails before attempting to use authentication provided in auth.json) --- src/Composer/Util/Svn.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Composer/Util/Svn.php b/src/Composer/Util/Svn.php index 9ba08bf85..b91592b03 100644 --- a/src/Composer/Util/Svn.php +++ b/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()) {