Skip to content

Commit

Permalink
[rubygems/rubygems] Use RubyGems freebsd helper
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez authored and matzbot committed May 16, 2024
1 parent 4db76d1 commit 9fd4148
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/cli/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def run

Bundler.self_manager.install_locked_bundler_and_restart_with_it_if_needed

Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Gem.freebsd_platform?

# Disable color in deployment mode
Bundler.ui.shell = Thor::Shell::Basic.new if options[:deployment]
Expand Down
7 changes: 7 additions & 0 deletions lib/bundler/rubygems_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
end

module Gem
# Can be removed once RubyGems 3.5.11 support is dropped
unless Gem.respond_to?(:freebsd_platform?)
def self.freebsd_platform?
RbConfig::CONFIG["host_os"].to_s.include?("bsd")
end
end

require "rubygems/specification"

class Specification
Expand Down

0 comments on commit 9fd4148

Please sign in to comment.