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:
Carlo Cabrera 2023-04-04 22:34:17 +08:00
parent fdbb7f37c2
commit 575cb0263c
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0
4 changed files with 9 additions and 4 deletions

View File

@ -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.

View File

@ -0,0 +1,8 @@
# typed: strict
# frozen_string_literal: true
module OS
module Mac
::MacOS = OS::Mac
end
end

View File

@ -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

View File

@ -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