Merge pull request #12708 from phoenixeliot/add-brew-cask-unsupported-message

Add helpful error message when attempting to run `brew cask`
This commit is contained in:
Rylan Polster 2022-02-11 11:11:58 -05:00 committed by GitHub
commit 26ba8ab769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,8 @@ begin
possible_tap = Tap.fetch(possible_tap.first) if possible_tap
if !possible_tap || possible_tap.installed? || Tap.untapped_official_taps.include?(possible_tap.name)
# Check for cask explicitly because it's very common in old guides
odie "`brew cask` is no longer a `brew` command. Use `brew <command> --cask` instead." if cmd == "cask"
odie "Unknown command: #{cmd}"
end