repair if condition
This commit is contained in:
parent
8289089482
commit
42960c3e74
@ -1,10 +1,8 @@
|
|||||||
# typed: true
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "simulate_system"
|
if OS.mac?
|
||||||
|
|
||||||
if OS.mac? && Hardware::CPU.arm?
|
|
||||||
require "extend/os/mac/default_prefix"
|
require "extend/os/mac/default_prefix"
|
||||||
elsif Homebrew::SimulateSystem.simulating_or_running_on_linux?
|
elsif OS.linux?
|
||||||
require "extend/os/linux/default_prefix"
|
require "extend/os/linux/default_prefix"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1,10 +1,17 @@
|
|||||||
# typed: true
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Homebrew
|
require "simulate_system"
|
||||||
remove_const(:DEFAULT_PREFIX)
|
|
||||||
DEFAULT_PREFIX = HOMEBREW_MACOS_ARM_DEFAULT_PREFIX
|
|
||||||
|
|
||||||
remove_const(:DEFAULT_REPOSITORY)
|
module Homebrew
|
||||||
DEFAULT_REPOSITORY = HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY
|
if Hardware::CPU.arm? || Homebrew::SimulateSystem.simulating_or_running_on_linux?
|
||||||
|
remove_const(:DEFAULT_PREFIX)
|
||||||
|
remove_const(:DEFAULT_REPOSITORY)
|
||||||
|
|
||||||
|
DEFAULT_PREFIX, DEFAULT_REPOSITORY = if Hardware::CPU.arm?
|
||||||
|
[HOMEBREW_MACOS_ARM_DEFAULT_PREFIX, HOMEBREW_MACOS_ARM_DEFAULT_REPOSITORY]
|
||||||
|
elsif Homebrew::SimulateSystem.simulating_or_running_on_linux?
|
||||||
|
[HOMEBREW_LINUX_DEFAULT_PREFIX, HOMEBREW_LINUX_DEFAULT_REPOSITORY]
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user