summaryrefslogtreecommitdiff
path: root/lib/bundler/fetcher/index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/fetcher/index.rb')
-rw-r--r--lib/bundler/fetcher/index.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/fetcher/index.rb b/lib/bundler/fetcher/index.rb
index 1a8064624d..9beb0e27d8 100644
--- a/lib/bundler/fetcher/index.rb
+++ b/lib/bundler/fetcher/index.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-require "bundler/fetcher/base"
+require_relative "base"
require "rubygems/remote_fetcher"
module Bundler
@@ -13,6 +13,7 @@ module Bundler
when /certificate verify failed/
raise CertificateFailureError.new(display_uri)
when /401/
+ raise BadAuthenticationError, remote_uri if remote_uri.userinfo
raise AuthenticationRequiredError, remote_uri
when /403/
raise BadAuthenticationError, remote_uri if remote_uri.userinfo