diff --git a/Library/Homebrew/cask/dsl/caveats.rb b/Library/Homebrew/cask/dsl/caveats.rb index 7a0591c76d..0436481f09 100644 --- a/Library/Homebrew/cask/dsl/caveats.rb +++ b/Library/Homebrew/cask/dsl/caveats.rb @@ -127,6 +127,17 @@ module Cask end end + caveat :requires_rosetta do + next unless Hardware::CPU.arm? + + <<~EOS + #{@cask} is built for Intel macOS and so requires Rosetta 2 to be installed. + You can install Rosetta 2 with: + softwareupdate --install-rosetta --agree-to-license + Note that it is very difficult to remove Rosetta 2 once it is installed. + EOS + end + caveat :logout do <<~EOS You must log out and log back in for the installation of #{@cask} to take effect.