mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Don't recommend the --no-deployment
flag
b368c7e0c4
This commit is contained in:
parent
1914c4e9b1
commit
97267227bb
Notes:
git
2020-06-05 07:34:06 +09:00
2 changed files with 2 additions and 6 deletions
|
@ -220,12 +220,10 @@ module Bundler
|
||||||
|
|
||||||
def check_for_deployment_mode!
|
def check_for_deployment_mode!
|
||||||
return unless Bundler.frozen_bundle?
|
return unless Bundler.frozen_bundle?
|
||||||
suggested_command = if Bundler.settings.locations("frozen")[:global]
|
suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any?
|
||||||
"bundle config unset frozen"
|
"bundle config unset frozen"
|
||||||
elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
|
elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
|
||||||
"bundle config unset deployment"
|
"bundle config unset deployment"
|
||||||
else
|
|
||||||
"bundle install --no-deployment"
|
|
||||||
end
|
end
|
||||||
raise ProductionError, "You are trying to check outdated gems in " \
|
raise ProductionError, "You are trying to check outdated gems in " \
|
||||||
"deployment mode. Run `bundle outdated` elsewhere.\n" \
|
"deployment mode. Run `bundle outdated` elsewhere.\n" \
|
||||||
|
|
|
@ -402,12 +402,10 @@ module Bundler
|
||||||
"updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control."
|
"updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control."
|
||||||
|
|
||||||
unless explicit_flag
|
unless explicit_flag
|
||||||
suggested_command = if Bundler.settings.locations("frozen")[:global]
|
suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any?
|
||||||
"bundle config unset frozen"
|
"bundle config unset frozen"
|
||||||
elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
|
elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any?
|
||||||
"bundle config unset deployment"
|
"bundle config unset deployment"
|
||||||
else
|
|
||||||
"bundle install --no-deployment"
|
|
||||||
end
|
end
|
||||||
msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \
|
msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \
|
||||||
"freeze \nby running `#{suggested_command}`."
|
"freeze \nby running `#{suggested_command}`."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue