1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Deprecate bundle exec --no-keep-file-descriptors

https://github.com/rubygems/rubygems/commit/591466d512
This commit is contained in:
David Rodríguez 2021-08-03 12:18:11 +02:00 committed by Hiroshi SHIBATA
parent 8c1b31f7b3
commit 10dcd0eb5b
Notes: git 2021-08-31 19:07:17 +09:00
2 changed files with 16 additions and 0 deletions

View file

@ -477,6 +477,10 @@ module Bundler
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

View file

@ -92,6 +92,18 @@ RSpec.describe "major deprecations" do
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