Install Cask’s default tap if untapped.
This commit is contained in:
parent
7395ff2001
commit
0dd3203187
@ -142,6 +142,7 @@ class Hbc::CLI
|
|||||||
command_string, *rest = *arguments
|
command_string, *rest = *arguments
|
||||||
rest = process_options(rest)
|
rest = process_options(rest)
|
||||||
command = Hbc.help ? "help" : lookup_command(command_string)
|
command = Hbc.help ? "help" : lookup_command(command_string)
|
||||||
|
Hbc.default_tap.install unless Hbc.default_tap.installed?
|
||||||
Hbc.init if should_init?(command)
|
Hbc.init if should_init?(command)
|
||||||
run_command(command, *rest)
|
run_command(command, *rest)
|
||||||
rescue Hbc::CaskError, Hbc::CaskSha256MismatchError => e
|
rescue Hbc::CaskError, Hbc::CaskSha256MismatchError => e
|
||||||
|
|||||||
@ -126,7 +126,7 @@ module Hbc::Locations
|
|||||||
attr_writer :default_tap
|
attr_writer :default_tap
|
||||||
|
|
||||||
def default_tap
|
def default_tap
|
||||||
@default_tap ||= Tap.fetch("caskroom/homebrew-cask")
|
@default_tap ||= Tap.fetch("caskroom", "homebrew-cask")
|
||||||
end
|
end
|
||||||
|
|
||||||
def path(query)
|
def path(query)
|
||||||
|
|||||||
@ -17,7 +17,6 @@ OFFICIAL_TAPS = %w[
|
|||||||
].freeze
|
].freeze
|
||||||
|
|
||||||
OFFICIAL_CMD_TAPS = {
|
OFFICIAL_CMD_TAPS = {
|
||||||
"caskroom/cask" => ["cask"],
|
|
||||||
"homebrew/bundle" => ["bundle"],
|
"homebrew/bundle" => ["bundle"],
|
||||||
"homebrew/services" => ["services"],
|
"homebrew/services" => ["services"],
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|||||||
@ -307,7 +307,7 @@ class Tap
|
|||||||
@formula_dir ||= [path/"Formula", path/"HomebrewFormula", path].detect(&:directory?)
|
@formula_dir ||= [path/"Formula", path/"HomebrewFormula", path].detect(&:directory?)
|
||||||
end
|
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
|
def cask_dir
|
||||||
@cask_dir ||= path/"Casks"
|
@cask_dir ||= path/"Casks"
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user