brew/Library/Homebrew/extend/os/mac/simulate_system.rb
2023-05-09 05:08:38 +02:00

22 lines
443 B
Ruby

# typed: true
# 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