From 59c1a7ff159190d46ad3a0314ac05039e9151942 Mon Sep 17 00:00:00 2001 From: till Date: Thu, 8 Mar 2012 16:53:41 +0100 Subject: [PATCH] * when an auth failure is detected and 'auth' is not present, we ask for credentials * ... and repeat --- src/Composer/Repository/Vcs/SvnDriver.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Composer/Repository/Vcs/SvnDriver.php b/src/Composer/Repository/Vcs/SvnDriver.php index 6252fef37..380e565d0 100644 --- a/src/Composer/Repository/Vcs/SvnDriver.php +++ b/src/Composer/Repository/Vcs/SvnDriver.php @@ -72,6 +72,17 @@ class SvnDriver extends VcsDriver implements VcsDriverInterface $svnCommand, $output ); + // this could be any failure, but let's see if it's auth related + if ($status == 1) { + if ($this->useAuth === false && strpos($output, 'authorization failed:') !== false) { + $this->svnUsername = $this->io->ask("What's your svn username?"); + $this->svnPassword = $this->io->ask("What's your svn password?"); + $this->useAuth = true; + + // restart the process + $output = $this->execute($command, $url); + } + } return $output; }