Skip to content

Commit 7dae2a1

Browse files
byrootmatzbot
authored andcommitted
[ruby/rubygems] Restore install as default command
Fix: ruby/rubygems#9124 This behavior is a deeply entrenched convention and changing it will annoy lots of developers with unclear gains. ruby/rubygems@628e0ede46
1 parent f18beda commit 7dae2a1

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

lib/bundler/cli.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,7 @@ def cli_help
123123
def self.default_command(meth = nil)
124124
return super if meth
125125

126-
default_cli_command = Bundler.settings[:default_cli_command]
127-
return default_cli_command if default_cli_command
128-
129-
Bundler.ui.warn(<<~MSG)
130-
In the next version of Bundler, running `bundle` without argument will no longer run `bundle install`.
131-
Instead, the `help` command will be displayed.
132-
133-
If you'd like to keep the previous behaviour please run `bundle config set default_cli_command install --global`.
134-
MSG
135-
136-
"install"
126+
Bundler.settings[:default_cli_command] || "install"
137127
end
138128

139129
class_option "no-color", type: :boolean, desc: "Disable colorization in output"

spec/bundler/bundler/cli_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ def out_with_macos_man_workaround
8787
end
8888

8989
context "with no arguments" do
90-
it "installs and log a warning by default" do
90+
it "installs by default" do
9191
bundle "", raise_on_error: false
92-
expect(err).to include("running `bundle` without argument will no longer run `bundle install`.")
9392
expect(err).to include("Could not locate Gemfile")
9493
end
9594

0 commit comments

Comments
 (0)