mirror of
https://github.com/ruby/ruby.git
synced 2026-01-26 20:19:19 +00:00
[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
This commit is contained in:
parent
f18bedaf96
commit
7dae2a1f48
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user