From 1851c29dd3d2d05096d3e1d2166fc0d73aa622eb Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Wed, 26 Feb 2014 17:19:54 +0100 Subject: [PATCH] Update code to work with #2766 --- src/Composer/Util/RemoteFilesystem.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index 7c7957ca7..fd5d431c6 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/src/Composer/Util/RemoteFilesystem.php @@ -262,17 +262,17 @@ class RemoteFilesystem case STREAM_NOTIFY_FAILURE: case STREAM_NOTIFY_AUTH_REQUIRED: if (401 === $messageCode) { + // Bail if the caller is going to handle authentication failures itself. + if (!$this->retryAuthFailure) { + break; + } + if (!$this->io->isInteractive()) { $message = "The '" . $this->fileUrl . "' URL required authentication.\nYou must be using the interactive console"; throw new TransportException($message, 401); } - // Bail if the caller is going to handle authentication failures itself. - if (!$this->retryAuthFailure) { - throw new TransportException('The "'.$this->fileUrl.'" file could not be downloaded ('.trim($message).')', 401); - } - $this->promptAuthAndRetry(); break; }