mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix use of tap
This commit is contained in:
parent
73046d68ff
commit
ce9216e66c
@ -55,7 +55,7 @@ module Homebrew
|
||||
@table[name] = value
|
||||
end
|
||||
|
||||
sig { params(_blk: T.nilable(T.proc.params(x: T.untyped).void)).returns(T.untyped) }
|
||||
sig { override.params(_blk: T.nilable(T.proc.params(x: T.untyped).void)).returns(T.untyped) }
|
||||
def tap(&_blk)
|
||||
return super if block_given? # Object#tap
|
||||
|
||||
|
@ -125,7 +125,7 @@ module Homebrew
|
||||
|
||||
audit_formulae, audit_casks = Homebrew.with_no_api_env do # audit requires full Ruby source
|
||||
if args.tap
|
||||
Tap.fetch(T.must(args.tap)).then do |tap|
|
||||
Tap.fetch(args.tap).then do |tap|
|
||||
[
|
||||
tap.formula_files.map { |path| Formulary.factory(path) },
|
||||
tap.cask_files.map { |path| Cask::CaskLoader.load(path) },
|
||||
|
@ -86,7 +86,7 @@ module Homebrew
|
||||
Formulary.factory(qualified_name)
|
||||
end
|
||||
elsif args.tap
|
||||
tap = Tap.fetch(T.must(args.tap))
|
||||
tap = Tap.fetch(args.tap)
|
||||
raise UsageError, "`--tap` requires `--auto` for official taps." if tap.official?
|
||||
|
||||
formulae = args.cask? ? [] : tap.formula_files.map { |path| Formulary.factory(path) }
|
||||
|
@ -60,7 +60,7 @@ module Homebrew
|
||||
|
||||
formulae_and_casks_to_check = Homebrew.with_no_api_env do
|
||||
if args.tap
|
||||
tap = Tap.fetch(T.must(args.tap))
|
||||
tap = Tap.fetch(args.tap)
|
||||
formulae = args.cask? ? [] : tap.formula_files.map { |path| Formulary.factory(path) }
|
||||
casks = args.formula? ? [] : tap.cask_files.map { |path| Cask::CaskLoader.load(path) }
|
||||
formulae + casks
|
||||
|
@ -80,9 +80,6 @@ class Homebrew::DevCmd::Audit::Args < Homebrew::CLI::Args
|
||||
sig { returns(T::Boolean) }
|
||||
def strict?; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def tap; end
|
||||
|
||||
sig { returns(T::Boolean) }
|
||||
def token_conflicts?; end
|
||||
end
|
||||
|
@ -49,7 +49,4 @@ class Homebrew::DevCmd::Bump::Args < Homebrew::CLI::Args
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def start_with; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def tap; end
|
||||
end
|
||||
|
@ -64,7 +64,4 @@ class Homebrew::DevCmd::Create::Args < Homebrew::CLI::Args
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def set_version; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def tap; end
|
||||
end
|
||||
|
@ -26,9 +26,6 @@ class Homebrew::DevCmd::DispatchBuildBottle::Args < Homebrew::CLI::Args
|
||||
sig { returns(T.nilable(T::Array[String])) }
|
||||
def macos; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def tap; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def timeout; end
|
||||
|
||||
|
@ -46,7 +46,4 @@ class Homebrew::DevCmd::LivecheckCmd::Args < Homebrew::CLI::Args
|
||||
|
||||
sig { returns(T::Boolean) }
|
||||
def resources?; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def tap; end
|
||||
end
|
||||
|
@ -20,9 +20,6 @@ class Homebrew::DevCmd::PrAutomerge::Args < Homebrew::CLI::Args
|
||||
sig { returns(T::Boolean) }
|
||||
def publish?; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def tap; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def with_label; end
|
||||
|
||||
|
@ -23,9 +23,6 @@ class Homebrew::DevCmd::PrPublish::Args < Homebrew::CLI::Args
|
||||
sig { returns(T.nilable(String)) }
|
||||
def message; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def tap; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def workflow; end
|
||||
end
|
||||
|
@ -65,9 +65,6 @@ class Homebrew::DevCmd::PrPull::Args < Homebrew::CLI::Args
|
||||
sig { returns(T.nilable(String)) }
|
||||
def root_url_using; end
|
||||
|
||||
sig { returns(T.nilable(String)) }
|
||||
def tap; end
|
||||
|
||||
sig { returns(T::Boolean) }
|
||||
def warn_on_upload_failure?; end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user