diff --git a/Library/Homebrew/os.rb b/Library/Homebrew/os.rb index 3152c91389..52945a402a 100644 --- a/Library/Homebrew/os.rb +++ b/Library/Homebrew/os.rb @@ -1,8 +1,6 @@ # typed: true # frozen_string_literal: true -require "version" - # Helper functions for querying operating system information. # # @api private diff --git a/Library/Homebrew/os/linux.rb b/Library/Homebrew/os/linux.rb index c8fcc00e52..277e3de3a9 100644 --- a/Library/Homebrew/os/linux.rb +++ b/Library/Homebrew/os/linux.rb @@ -8,8 +8,6 @@ module OS module_function - ::MacOS = OS::Mac - sig { returns(String) } def os_version if which("lsb_release") @@ -33,6 +31,8 @@ module OS module Mac module_function + ::MacOS = OS::Mac + raise "Loaded OS::Linux on generic OS!" if ENV["HOMEBREW_TEST_GENERIC_OS"] def version diff --git a/Library/Homebrew/os/mac/version.rb b/Library/Homebrew/os/mac/version.rb index a460141c50..5f86f697a2 100644 --- a/Library/Homebrew/os/mac/version.rb +++ b/Library/Homebrew/os/mac/version.rb @@ -16,7 +16,7 @@ module OS # TODO: bump version when new macOS is released or announced # and also update references in docs/Installation.md, # https://github.com/Homebrew/install/blob/HEAD/install.sh and - # OS::Mac::Version (in HOMEBREW_LIBRARY/os.rb) + # MacOSVersions::SYMBOLS NEWEST_UNSUPPORTED = "13" private_constant :NEWEST_UNSUPPORTED