Skip to content

Commit

Permalink
Skip the bash prelude in default bin/ scripts for the overwrite check…
Browse files Browse the repository at this point in the history
… in RubyGems

* Fixes oracle#2780
  • Loading branch information
eregon authored and john-heinnickel committed Aug 16, 2023
1 parent fccc931 commit 8818b3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mri/rubygems/installer.rb
Expand Up @@ -223,7 +223,8 @@ def check_executable_overwrite(filename) # :nodoc:
line = io.gets
shebang = /^#!.*ruby/

if load_relative_enabled?
# TruffleRuby uses a bash prelude in default launchers
if load_relative_enabled? or defined?(::TruffleRuby)
until line.nil? || line =~ shebang do
line = io.gets
end
Expand Down

0 comments on commit 8818b3e

Please sign in to comment.