summaryrefslogtreecommitdiff
path: root/lib/bundler
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2025-05-29 20:49:29 +0200
committerHiroshi SHIBATA <[email protected]>2025-06-05 19:12:45 +0900
commite4933e1d93218ff740ea6ac552b309eca03ba5d1 ()
treed7c1d06e969f9856f713971ed50369f943c4f8e7 /lib/bundler
parent5cf07c1e8fa32ff4619c02b1762b5b7bb074ad71 (diff)
[rubygems/rubygems] Fix `bundle update --bundler` when restarts disabled
There's no reason why we should not update bundler as requested, even if restarts are disabled. https://.com/rubygems/rubygems/commit/e59acd2a0d
-rw-r--r--lib/bundler/self_manager.rb11
1 files changed, 2 insertions, 9 deletions
@@ -31,8 +31,6 @@ module Bundler
end
def update_bundler_and_restart_with_it_if_needed(target)
- return unless autoswitching_applies?
-
spec = resolve_update_version_from(target)
return unless spec
@@ -40,7 +38,7 @@ module Bundler
Bundler.ui.info "Updating bundler to #{version}."
- install(spec)
restart_with(version)
end
@@ -102,8 +100,7 @@ module Bundler
def needs_switching?(restart_version)
autoswitching_applies? &&
released?(restart_version) &&
- !running?(restart_version) &&
- !updating?
end
def autoswitching_applies?
@@ -172,10 +169,6 @@ module Bundler
$PROGRAM_NAME != "-e"
end
- def updating?
- "update".start_with?(ARGV.first || " ") && ARGV[1..-1].any? {|a| a.start_with?("--bundler") }
- end
-
def installed?(restart_version)
Bundler.configure