1
0
Fork 0

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

pull/3967/head
Anael Ollier 2015-04-27 15:26:32 +02:00
parent 1cb427ff5c
commit b2efb95f33
1 changed files with 8 additions and 6 deletions

View File

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