From 085fb8d790c8ee9b883b4e7781a9710dd72b9abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Wed, 27 Nov 2019 01:07:11 +0100 Subject: [PATCH] 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. --- lib/bundler/friendly_errors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb index 273573e8206..080697b02c0 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 @@ 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