From 7448a6be587a84ee6a6df9c5cf81c81e5f56ac82 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Wed, 3 Mar 2021 00:13:50 +0000 Subject: [PATCH] Revert "Revert "uses_from_macos: fix force_homebrew_on_linux behaviour."" This reverts commit 9ad37ddc36c8438db97fdb3e4484d724e06eaffe. --- Library/Homebrew/extend/os/mac/software_spec.rb | 2 ++ Library/Homebrew/extend/os/software_spec.rb | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/software_spec.rb b/Library/Homebrew/extend/os/mac/software_spec.rb index 43c2efc4cc..4a4d1377c0 100644 --- a/Library/Homebrew/extend/os/mac/software_spec.rb +++ b/Library/Homebrew/extend/os/mac/software_spec.rb @@ -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 diff --git a/Library/Homebrew/extend/os/software_spec.rb b/Library/Homebrew/extend/os/software_spec.rb index 15da2d0e5a..9f130f7150 100644 --- a/Library/Homebrew/extend/os/software_spec.rb +++ b/Library/Homebrew/extend/os/software_spec.rb @@ -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