summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2025-11-26 18:58:42 +0100
committergit <svn-admin@ruby-lang.org>2025-11-28 23:49:59 +0000
commit7dae2a1f488afc4133dfbd6ea243aaeb71107f71 (patch)
tree921b36ce1207ae3324f8c9d22e708f7580d09225
parentf18bedaf96d950a69ae18df9a7eeea6754224c20 (diff)
[ruby/rubygems] Restore `install` as default command
Fix: https://github.com/ruby/rubygems/issues/9124 This behavior is a deeply entrenched convention and changing it will annoy lots of developers with unclear gains. https://github.com/ruby/rubygems/commit/628e0ede46
-rw-r--r--lib/bundler/cli.rb12
-rw-r--r--spec/bundler/bundler/cli_spec.rb3
2 files changed, 2 insertions, 13 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 55f656e3f3..b7829f2a0d 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -123,17 +123,7 @@ module Bundler
def self.default_command(meth = nil)
return super if meth
- default_cli_command = Bundler.settings[:default_cli_command]
- return default_cli_command if default_cli_command
-
- Bundler.ui.warn(<<~MSG)
- In the next version of Bundler, running `bundle` without argument will no longer run `bundle install`.
- Instead, the `help` command will be displayed.
-
- If you'd like to keep the previous behaviour please run `bundle config set default_cli_command install --global`.
- MSG
-
- "install"
+ Bundler.settings[:default_cli_command] || "install"
end
class_option "no-color", type: :boolean, desc: "Disable colorization in output"
diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb
index ee3c0d0fd5..611c1985e2 100644
--- a/spec/bundler/bundler/cli_spec.rb
+++ b/spec/bundler/bundler/cli_spec.rb
@@ -87,9 +87,8 @@ RSpec.describe "bundle executable" do
end
context "with no arguments" do
- it "installs and log a warning by default" do
+ it "installs by default" do
bundle "", raise_on_error: false
- expect(err).to include("running `bundle` without argument will no longer run `bundle install`.")
expect(err).to include("Could not locate Gemfile")
end