Skip to content

Commit

Permalink
[rubygems/rubygems] Deprecate bundle exec --no-keep-file-descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and hsbt committed Aug 31, 2021
1 parent 8c1b31f commit 10dcd0e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/bundler/cli.rb
Expand Up @@ -477,6 +477,10 @@ def cache
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
Expand Down
12 changes: 12 additions & 0 deletions spec/bundler/other/major_deprecation_spec.rb
Expand Up @@ -92,6 +92,18 @@
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
Expand Down

0 comments on commit 10dcd0e

Please sign in to comment.