diff options
author | David RodrÃguez <[email protected]> | 2024-07-18 20:17:55 +0200 |
---|---|---|
committer | git <[email protected]> | 2024-10-30 19:38:08 +0000 |
commit | 5da1cc6c9c548bf95599ad7aa1b3877f8ccda953 (patch) | |
tree | e5a686ff7e2c515d0b71d65d5d729abfe3e72cd0 | |
parent | 116d6cbc834c5c58a414d94f93f54e1007c0b60b (diff) |
[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 <[email protected]>
-rw-r--r-- | lib/rubygems/installer.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 520cf2e43c..7f5d913ac4 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -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 |