summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-11-27 09:34:36 +0000
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-12-13 20:07:19 +0100
commit245b4f0ed1f346312781d7e9d2a87d0ecc5c5202 (patch)
tree1d3e2110f851c2fd351ed57d3b7dd6582221bb85
parent6d30dcc88e144b63be3c6d00ba7def8967200991 (diff)
downloadbundler-245b4f0ed1f346312781d7e9d2a87d0ecc5c5202.tar.gz
Merge #7456
7456: Lazily load CGI r=deivid-rodriguez a=deivid-rodriguez Thanks so much for the contribution! To make reviewing this PR a bit easier, please fill out answers to the following questions. ### What was the end-user problem that led to this PR? The problem was that our ruby-head build is failing in CI. ### What was your diagnosis of the problem? My diagnosis was that since `cgi` is now a default gem on ruby 2.7, we're getting someunintended activations of the new default gem inside our specs. ### What is your fix for the problem, implemented in this PR? My fix is to lazily load CGI. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> (cherry picked from commit c3eae8ea436af06ab2c3f4bdd25bd9dd6e7c9eef)
-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