From 37c3102a9ea0d3738fad2fe3245d41c48f1a339d Mon Sep 17 00:00:00 2001 From: Martin Hradil Date: Wed, 10 May 2017 15:09:03 +0000 Subject: [PATCH] override_gem - warn on stderr, not stdout the warning about using override_gem goes to stdout right now, making it hard to parse rake task outputs (There is support for stderr in bundler 2, not 1.) So.. changing to use Kernel#warn, which is not yellow, but does output to stderr --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 67e638aa05f..eb32f442ddf 100644 --- a/Gemfile +++ b/Gemfile @@ -148,7 +148,7 @@ def override_gem(name, *args) calling_file = caller_locations.detect { |loc| !loc.path.include?("lib/bundler") }.path gem(name, *args).tap do - Bundler::UI::Shell.new.warn "** override_gem: #{name}, #{args.inspect}, caller: #{calling_file}" unless ENV["RAILS_ENV"] == "production" + warn "** override_gem: #{name}, #{args.inspect}, caller: #{calling_file}" unless ENV["RAILS_ENV"] == "production" end end end