diff --git a/Formula/s/swift.rb b/Formula/s/swift.rb index 9e8b68c432c6..f78d7c4ac855 100644 --- a/Formula/s/swift.rb +++ b/Formula/s/swift.rb @@ -450,7 +450,7 @@ def caveats module_cache.mkdir # Temporary hack while macOS 13 SDK prebuilding is disabled. - if MacOS.version == :ventura + if OS.mac? && MacOS.version == :ventura ENV.remove_macosxsdk ENV["SDKROOT"] = "/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk" end