summaryrefslogtreecommitdiff
path: root/lib/bundler/source/git/git_proxy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/source/git/git_proxy.rb')
-rw-r--r--lib/bundler/source/git/git_proxy.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/source/git/git_proxy.rb b/lib/bundler/source/git/git_proxy.rb
index 2a4d7138a4..7612eb16c6 100644
--- a/lib/bundler/source/git/git_proxy.rb
+++ b/lib/bundler/source/git/git_proxy.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true
-require "open3"
require "shellwords"
module Bundler
@@ -218,7 +217,7 @@ module Bundler
# Adds credentials to the URI as Fetcher#configured_uri_for does
def configured_uri_for(uri)
if /https?:/ =~ uri
- remote = URI(uri)
+ remote = Bundler::URI(uri)
config_auth = Bundler.settings[remote.to_s] || Bundler.settings[remote.host]
remote.userinfo ||= config_auth
remote.to_s
@@ -243,12 +242,14 @@ module Bundler
end
def capture_and_filter_stderr(uri, cmd)
+ require "open3"
return_value, captured_err, status = Open3.capture3(cmd)
Bundler.ui.warn URICredentialsFilter.credential_filtered_string(captured_err, uri) if uri && !captured_err.empty?
[return_value, status]
end
def capture_and_ignore_stderr(cmd)
+ require "open3"
return_value, _, status = Open3.capture3(cmd)
[return_value, status]
end