diff --git a/Library/Homebrew/extend/os/mac/simulate_system.rb b/Library/Homebrew/extend/os/mac/simulate_system.rb index f027eb0b883c6..cba78f44e98f0 100644 --- a/Library/Homebrew/extend/os/mac/simulate_system.rb +++ b/Library/Homebrew/extend/os/mac/simulate_system.rb @@ -6,8 +6,9 @@ module Mac module SimulateSystem sig { returns(T::Boolean) } def simulating_or_running_on_macos? - Homebrew::SimulateSystem.os.blank? || [:macos, - *MacOSVersion::SYMBOLS.keys].include?(Homebrew::SimulateSystem.os) + return true if Homebrew::SimulateSystem.os.blank? + + [:macos, *MacOSVersion::SYMBOLS.keys].include?(Homebrew::SimulateSystem.os) end sig { returns(Symbol) }