Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable Ruby cleanup/fixes #17503

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/cmd/vendor-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ set_ruby_variables() {
fi
ruby_URLs+=(
"https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:${ruby_SHA}"
"https://github.com/Homebrew/homebrew-portable-ruby/releases/download/3.3.2/${ruby_FILENAME}"
"https://github.com/Homebrew/homebrew-portable-ruby/releases/download/3.3.3/${ruby_FILENAME}"
)
ruby_URL="${ruby_URLs[0]}"
fi
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/standalone/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
require "pathname"
dir = __dir__ || raise("__dir__ is not defined")
HOMEBREW_LIBRARY_PATH = Pathname(dir).parent.realpath.freeze
HOMEBREW_PORTABLE_RUBY = Pathname.new(RbConfig.ruby).to_s.include?("/vendor/portable-ruby/").freeze
HOMEBREW_USING_PORTABLE_RUBY = Pathname.new(RbConfig.ruby).to_s.include?("/vendor/portable-ruby/").freeze
MikeMcQuaid marked this conversation as resolved.
Show resolved Hide resolved

require_relative "../utils/gems"
Homebrew.setup_gem_environment!(setup_path: false)
Expand All @@ -48,7 +48,7 @@
$LOAD_PATH.insert(last_homebrew_path_idx + 1, HOMEBREW_LIBRARY_PATH.to_s)
end
require_relative "../vendor/bundle/bundler/setup"
require "portable_ruby_gems" if HOMEBREW_PORTABLE_RUBY
require "portable_ruby_gems" if HOMEBREW_USING_PORTABLE_RUBY
$LOAD_PATH.unshift "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle/#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/" \
"bundler-#{Homebrew::HOMEBREW_BUNDLER_VERSION}/lib"
$LOAD_PATH.uniq!
2 changes: 1 addition & 1 deletion Library/Homebrew/startup/bootsnap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
begin
require "bootsnap"
rescue LoadError
raise if ENV["HOMEBREW_BOOTSNAP_RETRY"] || HOMEBREW_PORTABLE_RUBY
raise if ENV["HOMEBREW_BOOTSNAP_RETRY"] || HOMEBREW_USING_PORTABLE_RUBY

Homebrew.install_bundler_gems!(groups: ["bootsnap"], only_warn_on_failure: true)

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/utils/gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def install_bundler_gems!(only_warn_on_failure: false, setup_path: true, groups:

# Combine the passed groups with the ones stored in settings.
groups |= (user_gem_groups & valid_gem_groups)
groups.delete("bootsnap") if HOMEBREW_PORTABLE_RUBY
groups.delete("bootsnap") if HOMEBREW_USING_PORTABLE_RUBY
groups.sort!

if (homebrew_bundle_user_cache = ENV.fetch("HOMEBREW_BUNDLE_USER_CACHE", nil))
Expand Down