summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-27 01:07:11 +0100
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-11-27 01:07:11 +0100
commit085fb8d790c8ee9b883b4e7781a9710dd72b9abf (patch)
tree73c4a8409701666e7222b153901bdb145b07ac80
parent2a5378c8c50773b6f8974eb4914894c7c5bd766b (diff)
downloadbundler-085fb8d790c8ee9b883b4e7781a9710dd72b9abf.tar.gz
Lazily load CGI
Since cgi is now a default gem on ruby 2.7, we're getting some unintended activations of the new default gem inside our specs.
-rw-r--r--lib/bundler/friendly_errors.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index 273573e820..080697b02c 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true
-require "cgi"
require_relative "vendored_thor"
module Bundler
@@ -114,6 +113,7 @@ module Bundler
def issues_url(exception)
message = exception.message.lines.first.tr(":", " ").chomp
message = message.split("-").first if exception.is_a?(Errno)
+ require "cgi"
"https://github.com/bundler/bundler/search?q=" \
"#{CGI.escape(message)}&type=Issues"
end