[rubygems/rubygems] Fix bundle package --no-install
no longer skipping install
This is a regression from https://github.com/rubygems/rubygems/commit/cf749f8ffabd. The funny thing is that we have a spec for this feature, so it was unclear how we regressed here. It turns out there was a bug in one of our negative matchers checking that gems ARE NOT included in a bundle. This commit fixes the bug in the negative matcher and reverts https://github.com/rubygems/rubygems/commit/cf749f8ffabd (with a slightly simpler diff). https://github.com/rubygems/rubygems/commit/3f9a4ff32a
This commit is contained in:
parent
0b11eac2d6
commit
4f5eb48dea
@ -251,7 +251,9 @@ module Bundler
|
|||||||
remembered_negative_flag_deprecation("no-deployment")
|
remembered_negative_flag_deprecation("no-deployment")
|
||||||
|
|
||||||
require_relative "cli/install"
|
require_relative "cli/install"
|
||||||
Install.new(options.dup).run
|
Bundler.settings.temporary(:no_install => false) do
|
||||||
|
Install.new(options.dup).run
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
map aliases_for("install")
|
map aliases_for("install")
|
||||||
@ -297,7 +299,9 @@ module Bundler
|
|||||||
def update(*gems)
|
def update(*gems)
|
||||||
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
SharedHelpers.major_deprecation(2, "The `--force` option has been renamed to `--redownload`") if ARGV.include?("--force")
|
||||||
require_relative "cli/update"
|
require_relative "cli/update"
|
||||||
Update.new(options, gems).run
|
Bundler.settings.temporary(:no_install => false) do
|
||||||
|
Update.new(options, gems).run
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "show GEM [OPTIONS]", "Shows all gems that are part of the bundle, or the path to a given gem"
|
desc "show GEM [OPTIONS]", "Shows all gems that are part of the bundle, or the path to a given gem"
|
||||||
|
@ -14,7 +14,7 @@ module Bundler
|
|||||||
Bundler.settings.set_command_option_if_given :cache_path, options["cache-path"]
|
Bundler.settings.set_command_option_if_given :cache_path, options["cache-path"]
|
||||||
|
|
||||||
setup_cache_all
|
setup_cache_all
|
||||||
install unless Bundler.settings[:no_install]
|
install
|
||||||
|
|
||||||
# TODO: move cache contents here now that all bundles are locked
|
# TODO: move cache contents here now that all bundles are locked
|
||||||
custom_path = Bundler.settings[:path] if options[:path]
|
custom_path = Bundler.settings[:path] if options[:path]
|
||||||
|
@ -161,6 +161,8 @@ module Bundler
|
|||||||
|
|
||||||
Bundler.settings.set_command_option_if_given :no_prune, options["no-prune"]
|
Bundler.settings.set_command_option_if_given :no_prune, options["no-prune"]
|
||||||
|
|
||||||
|
Bundler.settings.set_command_option_if_given :no_install, options["no-install"]
|
||||||
|
|
||||||
Bundler.settings.set_command_option_if_given :clean, options["clean"]
|
Bundler.settings.set_command_option_if_given :clean, options["clean"]
|
||||||
|
|
||||||
normalize_groups if options[:without] || options[:with]
|
normalize_groups if options[:without] || options[:with]
|
||||||
|
@ -160,6 +160,8 @@ module Bundler
|
|||||||
raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
|
raise GemNotFound, "Could not find #{spec.file_name} for installation" unless path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return if Bundler.settings[:no_install]
|
||||||
|
|
||||||
if requires_sudo?
|
if requires_sudo?
|
||||||
install_path = Bundler.tmp(spec.full_name)
|
install_path = Bundler.tmp(spec.full_name)
|
||||||
bin_path = install_path.join("bin")
|
bin_path = install_path.join("bin")
|
||||||
|
@ -178,7 +178,7 @@ module Spec
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
require '#{name}'
|
require '#{name}'
|
||||||
name_constant = '#{Spec::Builders.constantize(name)}'
|
name_constant = #{Spec::Builders.constantize(name)}
|
||||||
if #{version.nil?} || name_constant == '#{version}'
|
if #{version.nil?} || name_constant == '#{version}'
|
||||||
exit 64
|
exit 64
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user