Skip to content
Snippets Groups Projects
Commit 8d6b6a45 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

brew.rb: handle cask autoinstall when cask tapped.

Otherwise it would assume if `cask` was tapped it was also installed.
parent 9b030d38
No related branches found
No related tags found
No related merge requests found
......@@ -162,20 +162,26 @@ begin
Tap.fetch("Homebrew", "services")
end
command_installed = false
if possible_tap && !possible_tap.installed?
possible_tap.install
command_installed = true
end
if cmd == "cask"
require "cmd/install"
brew_cask = Formulary.factory("brew-cask")
Homebrew.install_formula(brew_cask)
end
if cmd == "cask" && (brew_cask = Formulary.factory("brew-cask")) \
&& !brew_cask.installed?
require "cmd/install"
Homebrew.install_formula(brew_cask)
command_installed = true
end
if command_installed
exec HOMEBREW_BREW_FILE, cmd, *ARGV
else
onoe "Unknown command: #{cmd}"
exit 1
end
onoe "Unknown command: #{cmd}"
exit 1
end
rescue FormulaUnspecifiedError
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment