Update code to work with #2766

main
Jordi Boggiano 10 years ago
parent 9db2a537e5
commit 1851c29dd3

@ -262,17 +262,17 @@ class RemoteFilesystem
case STREAM_NOTIFY_FAILURE: case STREAM_NOTIFY_FAILURE:
case STREAM_NOTIFY_AUTH_REQUIRED: case STREAM_NOTIFY_AUTH_REQUIRED:
if (401 === $messageCode) { if (401 === $messageCode) {
// Bail if the caller is going to handle authentication failures itself.
if (!$this->retryAuthFailure) {
break;
}
if (!$this->io->isInteractive()) { if (!$this->io->isInteractive()) {
$message = "The '" . $this->fileUrl . "' URL required authentication.\nYou must be using the interactive console"; $message = "The '" . $this->fileUrl . "' URL required authentication.\nYou must be using the interactive console";
throw new TransportException($message, 401); 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(); $this->promptAuthAndRetry();
break; break;
} }

Loading…
Cancel
Save