cask/dsl/caveats: add :requires_rosetta
Some casks will fail to install with a `Bad CPU type in executable` error on Apple Silicon. See Homebrew/homebrew-cask#118638. This error can be quite confusing, so let's add a way to help users know that they need to install Rosetta to use or even install a cask.
This commit is contained in:
parent
8e97f60858
commit
902b4e1f3f
@ -127,6 +127,17 @@ module Cask
|
|||||||
end
|
end
|
||||||
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
|
caveat :logout do
|
||||||
<<~EOS
|
<<~EOS
|
||||||
You must log out and log back in for the installation of #{@cask} to take effect.
|
You must log out and log back in for the installation of #{@cask} to take effect.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user