You can use homebrew's native `MacOS.version` to find out the OS.