brew/Library/Homebrew/os/mac/global.rb
Mike McQuaid 0f9bad0052
Fix bottle prefix and repository handling
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
2020-12-09 13:53:10 +00:00

13 lines
355 B
Ruby

# typed: false
# frozen_string_literal: true
module Homebrew
if Hardware::CPU.arm?
DEFAULT_PREFIX ||= HOMEBREW_MACOS_ARM_DEFAULT_PREFIX.freeze
DEFAULT_REPOSITORY ||= HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY.freeze
else
DEFAULT_PREFIX ||= HOMEBREW_DEFAULT_PREFIX.freeze
DEFAULT_REPOSITORY ||= HOMEBREW_DEFAULT_REPOSITORY.freeze
end
end