Browse Source

take care of retry-auth-failure:false in case of 403 as well

Jordi Boggiano 9 years ago
parent
commit
41f4451c20
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/Composer/Util/RemoteFilesystem.php

+ 5 - 0
src/Composer/Util/RemoteFilesystem.php

@@ -308,6 +308,11 @@ class RemoteFilesystem
 
             case STREAM_NOTIFY_AUTH_RESULT:
                 if (403 === $messageCode) {
+                    // Bail if the caller is going to handle authentication failures itself.
+                    if (!$this->retryAuthFailure) {
+                        break;
+                    }
+
                     $this->promptAuthAndRetry($messageCode, $message);
                     break;
                 }