[ruby/rubygems] Improve banner message for the default command.

Co-authored-by: Benoit Daloze <eregontp@gmail.com>

https://github.com/ruby/rubygems/commit/463488b439

Co-authored-by: Patrik Ragnarsson <patrik@starkast.net>
This commit is contained in:
Hiroshi SHIBATA 2025-12-02 11:39:29 +09:00 committed by git
parent e2d176556e
commit 7df97983be
2 changed files with 5 additions and 5 deletions

View File

@ -133,10 +133,10 @@ module Bundler
unless Bundler.settings[:default_cli_command]
Bundler.ui.info <<-MSG
In the feature version of Bundler, running `bundle` without argument will no longer run `bundle install`.
In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`.
Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly for scripts like CI/CD.
If you wish to use feature behavior now with `bundle config set default_cli_command cli_help --global`
or you can continue to use the old behavior with `bundle config set default_cli_command install_or_cli_help --global`.
You can use the future behavior now with `bundle config set default_cli_command cli_help --global`,
or you can continue to use the current behavior with `bundle config set default_cli_command install_or_cli_help --global`.
This message will be removed after a default_cli_command value is set.
MSG
end

View File

@ -90,7 +90,7 @@ RSpec.describe "bundle executable" do
it "tries to installs by default but print help on missing Gemfile" do
bundle "", raise_on_error: false
expect(err).to include("Could not locate Gemfile")
expect(out).to include("In the feature version of Bundler")
expect(out).to include("In a future version of Bundler")
expect(out).to include("Bundler version #{Bundler::VERSION}").
and include("\n\nBundler commands:\n\n").
@ -102,7 +102,7 @@ RSpec.describe "bundle executable" do
it "runs bundle install when default_cli_command set to install" do
bundle "config set default_cli_command install_or_cli_help"
bundle "", raise_on_error: false
expect(out).to_not include("In the feature version of Bundler")
expect(out).to_not include("In a future version of Bundler")
expect(err).to include("Could not locate Gemfile")
end
end