mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix brew search
for HOMEBREW_INSTALL_FROM_API
This commit is contained in:
parent
462c69d3d5
commit
cc615ef7fb
@ -137,6 +137,10 @@ module Homebrew
|
||||
c.sub(%r{^homebrew/cask.*/}, "")
|
||||
end
|
||||
|
||||
if !Tap.fetch("homebrew/cask").installed? && Homebrew::EnvConfig.install_from_api?
|
||||
cask_tokens += Homebrew::API::Cask.all_casks.keys
|
||||
end
|
||||
|
||||
results = cask_tokens.extend(Searchable)
|
||||
.search(string_or_regex)
|
||||
|
||||
|
@ -927,6 +927,20 @@ class CoreTap < Tap
|
||||
def alias_file_to_name(file)
|
||||
file.basename.to_s
|
||||
end
|
||||
|
||||
# @private
|
||||
def aliases
|
||||
return super if installed? || !Homebrew::EnvConfig.install_from_api?
|
||||
|
||||
Homebrew::API::Formula.all_aliases.keys
|
||||
end
|
||||
|
||||
# @private
|
||||
def formula_names
|
||||
return super if installed? || !Homebrew::EnvConfig.install_from_api?
|
||||
|
||||
Homebrew::API::Formula.all_formulae.keys
|
||||
end
|
||||
end
|
||||
|
||||
# Permanent configuration per {Tap} using `git-config(1)`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user