ruby-changes:67440
From: David <ko1@a...>
Date: Tue, 31 Aug 2021 19:07:29 +0900 (JST)
Subject: [ruby-changes:67440] 10dcd0eb5b (master): [rubygems/rubygems] Deprecate `bundle exec --no-keep-file-descriptors`
https://git.ruby-lang.org/ruby.git/commit/?id=10dcd0eb5b From 10dcd0eb5b848ffb8e5f0e830f5f8ad014a49e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Tue, 3 Aug 2021 12:18:11 +0200 Subject: [rubygems/rubygems] Deprecate `bundle exec --no-keep-file-descriptors` https://github.com/rubygems/rubygems/commit/591466d512 --- lib/bundler/cli.rb | 4 ++++ spec/bundler/other/major_deprecation_spec.rb | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 8d9f3a5..3ff5f68 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -477,6 +477,10 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L477 into the system wide RubyGems repository. D def exec(*args) + if ARGV.include?("--no-keep-file-descriptors") + SharedHelpers.major_deprecation(2, "The `--no-keep-file-descriptors` has been deprecated. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to") + end + require_relative "cli/exec" Exec.new(options, args).run end diff --git a/spec/bundler/other/major_deprecation_spec.rb b/spec/bundler/other/major_deprecation_spec.rb index 688efbc..daebdbe 100644 --- a/spec/bundler/other/major_deprecation_spec.rb +++ b/spec/bundler/other/major_deprecation_spec.rb @@ -92,6 +92,18 @@ RSpec.describe "major deprecations" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/other/major_deprecation_spec.rb#L92 end end + describe "bundle exec --no-keep-file-descriptors" do + before do + bundle "exec --no-keep-file-descriptors -e 1", :raise_on_error => false + end + + it "is deprecated", :bundler => "< 3" do + expect(deprecations).to include "The `--no-keep-file-descriptors` has been deprecated. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to" + end + + pending "is removed and shows a helpful error message about it", :bundler => "3" + end + describe "bundle update --quiet" do it "does not print any deprecations" do bundle :update, :quiet => true, :raise_on_error => false -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/