Skip to content

Commit 19b3c58

Browse files
authored
Merge pull request #21111 from Homebrew/remove-portable-ruby-path
Remove portable ruby bin from PATH
2 parents 43ba00f + c9c6812 commit 19b3c58

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Library/Homebrew/test/utils/ruby_check_version_script_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
Bundler.with_unbundled_env do
88
ENV.delete_if { |key,| key.start_with?("HOMEBREW_") }
99
ENV.update(homebrew_env)
10-
quiet_system "#{HOMEBREW_LIBRARY_PATH}/utils/ruby_check_version_script.rb", required_ruby_version
10+
# We intentionally don't use the shebang in this script as portable Ruby
11+
# is usually not in PATH. This aligns with how we run the script in brew.
12+
quiet_system RUBY_PATH, "#{HOMEBREW_LIBRARY_PATH}/utils/ruby_check_version_script.rb", required_ruby_version
1113
end
1214
end
1315

Library/Homebrew/utils/ruby.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ If there's no Homebrew Portable Ruby available for your processor:
173173
then
174174
"${homebrew_ruby_bin}/gem" install bundler -v "${HOMEBREW_BUNDLER_VERSION}"
175175
fi
176-
PATH="${homebrew_ruby_bin}:${PATH}"
177176

178177
export HOMEBREW_RUBY_PATH HOMEBREW_BOOTSNAP_GEM_PATH
179178
[[ -n "${HOMEBREW_LINUX}" && -n "${TERMINFO_DIRS}" ]] && export TERMINFO_DIRS

0 commit comments

Comments
 (0)