[rubygems/rubygems] Rely on PATH if Ruby is not installed in the same directory as the binstub

https://github.com/rubygems/rubygems/commit/ab7d65cc18

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
David Rodríguez 2024-07-18 20:17:55 +02:00 committed by git
parent 116d6cbc83
commit 5da1cc6c9c

View File

@ -1004,7 +1004,11 @@ TEXT
_=_\\
=begin
bindir="${0%/*}"
exec "$bindir/#{ruby_install_name}" "-x" "$0" "$@"
ruby="$bindir/#{ruby_install_name}"
if [ ! -f "$ruby" ]; then
ruby="#{ruby_install_name}"
fi
exec "$ruby" "-x" "$0" "$@"
=end
EOS
else