determine-test-runners: fix generic OS test failures
Without this, testing on the generic OS results in errors like
Error: uninitialized constant Homebrew::MacOS
This commit is contained in:
parent
fdbb7f37c2
commit
575cb0263c
@ -55,6 +55,7 @@ module OS
|
||||
LINUX_PREFERRED_GCC_COMPILER_FORMULA = "gcc@11" # https://packages.ubuntu.com/jammy/gcc
|
||||
LINUX_PREFERRED_GCC_RUNTIME_FORMULA = "gcc"
|
||||
|
||||
require "os/generic"
|
||||
if OS.mac?
|
||||
require "os/mac"
|
||||
# Don't tell people to report issues on unsupported configurations.
|
||||
|
||||
8
Library/Homebrew/os/generic.rb
Normal file
8
Library/Homebrew/os/generic.rb
Normal file
@ -0,0 +1,8 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
module OS
|
||||
module Mac
|
||||
::MacOS = OS::Mac
|
||||
end
|
||||
end
|
||||
@ -54,8 +54,6 @@ module OS
|
||||
module Mac
|
||||
module_function
|
||||
|
||||
::MacOS = OS::Mac
|
||||
|
||||
raise "Loaded OS::Linux on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"]
|
||||
|
||||
def version
|
||||
|
||||
@ -13,8 +13,6 @@ module OS
|
||||
|
||||
module_function
|
||||
|
||||
::MacOS = OS::Mac
|
||||
|
||||
raise "Loaded OS::Mac on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"]
|
||||
|
||||
VERSION = ENV.fetch("HOMEBREW_MACOS_VERSION").chomp.freeze
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user