From 7dae2a1f488afc4133dfbd6ea243aaeb71107f71 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Wed, 26 Nov 2025 18:58:42 +0100 Subject: [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 --- lib/bundler/cli.rb | 12 +----------- spec/bundler/bundler/cli_spec.rb | 3 +-- 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 -- cgit v1.2.3