Fix on_{macos_version} blocks on Linux

This commit is contained in:
Rylan Polster 2022-07-05 19:05:42 -04:00
parent 88a5fac967
commit 39453f87ef
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -41,6 +41,8 @@ module OnSystem
raise ArgumentError, "Invalid OS `or_*` condition: #{or_condition.inspect}" raise ArgumentError, "Invalid OS `or_*` condition: #{or_condition.inspect}"
end end
return false if Homebrew::SimulateSystem.linux? || (Homebrew::SimulateSystem.none? && OS.linux?)
base_os = MacOS::Version.from_symbol(os_name) base_os = MacOS::Version.from_symbol(os_name)
current_os = MacOS::Version.from_symbol(Homebrew::SimulateSystem.os || MacOS.version.to_sym) current_os = MacOS::Version.from_symbol(Homebrew::SimulateSystem.os || MacOS.version.to_sym)