From 0dd320318706bed665038350f11a74a0fb8e7f34 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 20 Aug 2016 07:02:23 +0200 Subject: [PATCH] =?UTF-8?q?Install=20Cask=E2=80=99s=20default=20tap=20if?= =?UTF-8?q?=20untapped.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Homebrew/cask/lib/hbc/cli.rb | 1 + Library/Homebrew/cask/lib/hbc/locations.rb | 2 +- Library/Homebrew/official_taps.rb | 1 - Library/Homebrew/tap.rb | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb index be40ce11b5..d1fb991084 100644 --- a/Library/Homebrew/cask/lib/hbc/cli.rb +++ b/Library/Homebrew/cask/lib/hbc/cli.rb @@ -142,6 +142,7 @@ class Hbc::CLI command_string, *rest = *arguments rest = process_options(rest) command = Hbc.help ? "help" : lookup_command(command_string) + Hbc.default_tap.install unless Hbc.default_tap.installed? Hbc.init if should_init?(command) run_command(command, *rest) rescue Hbc::CaskError, Hbc::CaskSha256MismatchError => e diff --git a/Library/Homebrew/cask/lib/hbc/locations.rb b/Library/Homebrew/cask/lib/hbc/locations.rb index e4d88f3187..b800cf6b6a 100644 --- a/Library/Homebrew/cask/lib/hbc/locations.rb +++ b/Library/Homebrew/cask/lib/hbc/locations.rb @@ -126,7 +126,7 @@ module Hbc::Locations attr_writer :default_tap def default_tap - @default_tap ||= Tap.fetch("caskroom/homebrew-cask") + @default_tap ||= Tap.fetch("caskroom", "homebrew-cask") end def path(query) diff --git a/Library/Homebrew/official_taps.rb b/Library/Homebrew/official_taps.rb index 55e726102e..53f3640d1b 100644 --- a/Library/Homebrew/official_taps.rb +++ b/Library/Homebrew/official_taps.rb @@ -17,7 +17,6 @@ OFFICIAL_TAPS = %w[ ].freeze OFFICIAL_CMD_TAPS = { - "caskroom/cask" => ["cask"], "homebrew/bundle" => ["bundle"], "homebrew/services" => ["services"], }.freeze diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 22b1232505..fb194a5bb9 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -307,7 +307,7 @@ class Tap @formula_dir ||= [path/"Formula", path/"HomebrewFormula", path].detect(&:directory?) end - # path to the directory of all casks for caskroom/cask {Tap}. + # path to the directory of all {Cask} files for this {Tap}. def cask_dir @cask_dir ||= path/"Casks" end