summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-09-30 12:36:40 +0200
committergit <svn-admin@ruby-lang.org>2024-10-07 16:36:50 +0000
commita90861340ae6799ae9dcd75a14b451cae433cefe (patch)
treece5c3021aee407714f365ac1b5bf537b6f05dbeb
parent8d359644e7a71c4835b8f385c308571a7a8baf7f (diff)
[rubygems/rubygems] Fix `bundle.bat` re-execution
It does not have ruby code, so we should not prepend `ruby` to the command the re-execute it. https://github.com/rubygems/rubygems/commit/e04e00f7bb
-rw-r--r--lib/bundler/self_manager.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/self_manager.rb b/lib/bundler/self_manager.rb
index 6ab41b99f7..21516713d4 100644
--- a/lib/bundler/self_manager.rb
+++ b/lib/bundler/self_manager.rb
@@ -85,7 +85,7 @@ module Bundler
cmd = [*Shellwords.shellsplit(bundler_spec_original_cmd), *ARGV]
else
cmd = [$PROGRAM_NAME, *ARGV]
- cmd.unshift(Gem.ruby) unless File.executable?($PROGRAM_NAME)
+ cmd.unshift(Gem.ruby) unless File.executable?($PROGRAM_NAME) || $PROGRAM_NAME.end_with?(".bat")
end
Bundler.with_original_env do