diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-06-14 11:44:45 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2018-06-14 11:44:45 +0900 |
commit | 9e1a70e72f9556886442041b39adeb2e8ef587ab (patch) | |
tree | 91732222e729177340813ad22348cb13099f3205 | |
parent | f358c36b580723a39c7dd72fafd883e59d9b05df (diff) | |
download | bundler-9e1a70e72f9556886442041b39adeb2e8ef587ab.tar.gz |
Only enable remove_auth when providing auth info.
URI of Ruby 2.6 will raise auth info assignment with file protocol.
-rw-r--r-- | lib/bundler/source/rubygems.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 2f4a2fdac8..9e5032c079 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -344,7 +344,11 @@ module Bundler end def remove_auth(remote) - remote.dup.tap {|uri| uri.user = uri.password = nil }.to_s + if remote.user || remote.password + remote.dup.tap {|uri| uri.user = uri.password = nil }.to_s + else + remote.to_s + end end def installed_specs |