Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Merge #7456
Browse files Browse the repository at this point in the history
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 c3eae8e)
  • Loading branch information
bundlerbot authored and deivid-rodriguez committed Dec 13, 2019
1 parent 6d30dcc commit 245b4f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/friendly_errors.rb
@@ -1,6 +1,5 @@
# frozen_string_literal: true

require "cgi"
require_relative "vendored_thor"

module Bundler
Expand Down Expand Up @@ -114,6 +113,7 @@ def request_issue_report_for(e)
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
Expand Down

0 comments on commit 245b4f0

Please sign in to comment.