various: Homebrew/core is the core tap
Also make `Homebrew/homebrew` as an alias of this tap to keep backward compatibility.
This commit is contained in:
parent
c5132daf63
commit
a5cfc011e0
@ -38,7 +38,6 @@ module Homebrew
|
||||
if ARGV.named.empty?
|
||||
formulae = Formula.files
|
||||
alias_dirs = Tap.map(&:alias_dir)
|
||||
alias_dirs.unshift CoreTap.instance.alias_dir
|
||||
else
|
||||
tap = Tap.fetch(ARGV.named.first)
|
||||
raise TapUnavailableError, tap.name unless tap.installed?
|
||||
|
@ -10,8 +10,6 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
raise "#{tap} is not allowed" if taps.any?(&:core_tap?)
|
||||
|
||||
if ARGV.json == "v1"
|
||||
print_tap_json(taps)
|
||||
else
|
||||
|
@ -1073,13 +1073,13 @@ class Formula
|
||||
# an array of all tap {Formula} names
|
||||
# @private
|
||||
def self.tap_names
|
||||
@tap_names ||= Tap.flat_map(&:formula_names).sort
|
||||
@tap_names ||= Tap.reject(&:core_tap?).flat_map(&:formula_names).sort
|
||||
end
|
||||
|
||||
# an array of all tap {Formula} files
|
||||
# @private
|
||||
def self.tap_files
|
||||
@tap_files ||= Tap.flat_map(&:formula_files)
|
||||
@tap_files ||= Tap.reject(&:core_tap?).flat_map(&:formula_files)
|
||||
end
|
||||
|
||||
# an array of all {Formula} names
|
||||
@ -1152,7 +1152,7 @@ class Formula
|
||||
# an array of all tap aliases
|
||||
# @private
|
||||
def self.tap_aliases
|
||||
@tap_aliases ||= Tap.flat_map(&:aliases).sort
|
||||
@tap_aliases ||= Tap.reject(&:core_tap?).flat_map(&:aliases).sort
|
||||
end
|
||||
|
||||
# an array of all aliases
|
||||
|
@ -344,7 +344,7 @@ class Formulary
|
||||
if core_path(ref).file?
|
||||
opoo <<-EOS.undent
|
||||
#{ref} is provided by core, but is now shadowed by #{selected_formula.full_name}.
|
||||
To refer to the core formula, use Homebrew/homebrew/#{ref} instead.
|
||||
To refer to the core formula, use Homebrew/core/#{ref} instead.
|
||||
EOS
|
||||
end
|
||||
selected_formula
|
||||
|
@ -52,8 +52,9 @@ class Tab < OpenStruct
|
||||
attributes["source"]["tap"] = attributes.delete("tapped_from")
|
||||
end
|
||||
|
||||
if attributes["source"]["tap"] == "mxcl/master"
|
||||
attributes["source"]["tap"] = "Homebrew/homebrew"
|
||||
if attributes["source"]["tap"] == "mxcl/master" ||
|
||||
attributes["source"]["tap"] == "Homebrew/homebrew"
|
||||
attributes["source"]["tap"] = "homebrew/core"
|
||||
end
|
||||
|
||||
if attributes["source"]["spec"].nil?
|
||||
|
@ -30,7 +30,7 @@ class Tap
|
||||
user = "Homebrew" if user == "homebrew"
|
||||
repo = repo.strip_prefix "homebrew-"
|
||||
|
||||
if user == "Homebrew" && repo == "homebrew"
|
||||
if user == "Homebrew" && (repo == "homebrew" || repo == "core")
|
||||
return CoreTap.instance
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user