From 317c14daa654cf69feb0fd2d38a31a53da19ded5 Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Mon, 4 Jan 2021 13:03:48 +0100 Subject: [PATCH] missing_formula: fix cask installation advice on tap migration When an installed formula is missing and its source has migrated to a new tap, Homebrew warns the user about this, saying: You can access it again by running: brew tap new-name And then you can install it by running: brew cask install new-name Unfortunately, the "brew cask install" incantation is deprecated and the advice won't work: Error: Calling brew cask install is disabled! Use brew install [--cask] instead. This alters the advice to use the new "brew install --cask" notation, fixing the advice presented to the user. --- Library/Homebrew/missing_formula.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/missing_formula.rb b/Library/Homebrew/missing_formula.rb index 949b0a86b99b4..552f6b4f08ec5 100644 --- a/Library/Homebrew/missing_formula.rb +++ b/Library/Homebrew/missing_formula.rb @@ -109,7 +109,7 @@ def tap_migration_reason(name) break if new_tap_name == CoreTap.instance.name install_cmd = if new_tap_name.start_with?("homebrew/cask") - "cask install" + "install --cask" else "install" end