Merge pull request #1863 from alyssais/uses_ignore_untapped
uses: properly handle untapped formulae in recursive dependency expansion (again!)
This commit is contained in:
commit
ffa5ebde53
@ -57,6 +57,12 @@ module Homebrew
|
|||||||
elsif dep.build?
|
elsif dep.build?
|
||||||
Dependency.prune unless includes.include?("build?")
|
Dependency.prune unless includes.include?("build?")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# If a tap isn't installed, we can't find the dependencies of one
|
||||||
|
# its formulae, and an exception will be thrown if we try.
|
||||||
|
if dep.is_a?(TapDependency) && !dep.tap.installed?
|
||||||
|
Dependency.keep_but_prune_recursive_deps
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
dep_formulae = deps.map do |dep|
|
dep_formulae = deps.map do |dep|
|
||||||
|
|||||||
@ -175,7 +175,7 @@ class TapDependency < Dependency
|
|||||||
attr_reader :tap
|
attr_reader :tap
|
||||||
|
|
||||||
def initialize(name, tags = [], env_proc = DEFAULT_ENV_PROC, option_names = [name.split("/").last])
|
def initialize(name, tags = [], env_proc = DEFAULT_ENV_PROC, option_names = [name.split("/").last])
|
||||||
@tap = name.rpartition("/").first
|
@tap = Tap.fetch(name.rpartition("/").first)
|
||||||
super(name, tags, env_proc, option_names)
|
super(name, tags, env_proc, option_names)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -118,6 +118,11 @@ class DependencyTests < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
class TapDependencyTests < Homebrew::TestCase
|
class TapDependencyTests < Homebrew::TestCase
|
||||||
|
def test_tap
|
||||||
|
dep = TapDependency.new("foo/bar/dog")
|
||||||
|
assert_equal Tap.new("foo", "bar"), dep.tap
|
||||||
|
end
|
||||||
|
|
||||||
def test_option_names
|
def test_option_names
|
||||||
dep = TapDependency.new("foo/bar/dog")
|
dep = TapDependency.new("foo/bar/dog")
|
||||||
assert_equal %w[dog], dep.option_names
|
assert_equal %w[dog], dep.option_names
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user