
We were previously only looking at the `cellar` value when pouring bottles and ignoring the `prefix` and (implicit) `repository`. Actually look at these values and set the defaults for each platform. Also, when we're relocating to create or pour bottles when `prefix` and `repository` are equal then skip relocating the `repository` and always use references to the `prefix` instead. Fixes #9453
21 lines
636 B
Ruby
21 lines
636 B
Ruby
# typed: false
|
|
# frozen_string_literal: true
|
|
|
|
require "env_config"
|
|
|
|
# Enables experimental `patchelf.rb` write support.
|
|
HOMEBREW_PATCHELF_RB_WRITE = (
|
|
ENV["HOMEBREW_NO_PATCHELF_RB_WRITE"].blank? &&
|
|
(ENV["HOMEBREW_PATCHELF_RB_WRITE"].present? || ENV["CI"].present? || ENV["HOMEBREW_DEV_CMD_RUN"].present?)
|
|
).freeze
|
|
|
|
module Homebrew
|
|
if EnvConfig.force_homebrew_on_linux?
|
|
DEFAULT_PREFIX ||= HOMEBREW_DEFAULT_PREFIX.freeze
|
|
DEFAULT_REPOSITORY ||= HOMEBREW_DEFAULT_REPOSITORY.freeze
|
|
else
|
|
DEFAULT_PREFIX ||= HOMEBREW_LINUX_DEFAULT_PREFIX.freeze
|
|
DEFAULT_REPOSITORY ||= HOMEBREW_LINUX_DEFAULT_REPOSITORY.freeze
|
|
end
|
|
end
|