Revert "Revert "uses_from_macos: fix force_homebrew_on_linux behaviour.""

This reverts commit 9ad37ddc36c8438db97fdb3e4484d724e06eaffe.
This commit is contained in:
Bo Anderson 2021-03-03 00:13:50 +00:00
parent b3e78f31ea
commit 7448a6be58
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,8 @@
# typed: false
# frozen_string_literal: true
# The Library/Homebrew/extend/os/software_spec.rb conditional logic will need to be more nuanced
# if this file ever includes more than `uses_from_macos`.
class SoftwareSpec
undef uses_from_macos

View File

@ -1,8 +1,9 @@
# typed: strict
# frozen_string_literal: true
if OS.linux?
require "extend/os/linux/software_spec"
elsif OS.mac?
# This logic will need to be more nuanced if this file includes more than `uses_from_macos`.
if OS.mac? || Homebrew::EnvConfig.force_homebrew_on_linux?
require "extend/os/mac/software_spec"
elsif OS.linux?
require "extend/os/linux/software_spec"
end