brew/Library/Homebrew/extend/os/mac/simulate_system.rb
2024-08-15 08:03:45 -07:00

22 lines
445 B
Ruby

# typed: strict
# frozen_string_literal: true
module Homebrew
class SimulateSystem
class << self
undef simulating_or_running_on_macos?
undef current_os
sig { returns(T::Boolean) }
def simulating_or_running_on_macos?
os.blank? || [:macos, *MacOSVersion::SYMBOLS.keys].include?(os)
end
sig { returns(Symbol) }
def current_os
os || MacOS.version.to_sym
end
end
end
end