Merge pull request #13517 from Rylan12/fix-on-macos-version-on-linux

Fix `on_{macos_version}` blocks on Linux
This commit is contained in:
Bo Anderson 2022-07-06 01:09:28 +01:00 committed by GitHub
commit 9766811343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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