mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
add SoftwareSpec#go_resource
by analogy to similar code in formula.rb. Permits Homebrew/homebrew#37877. Closes Homebrew/homebrew#38330.
This commit is contained in:
parent
6370ccf9a8
commit
5a0ec0c491
@ -914,7 +914,7 @@ class Formula
|
|||||||
end
|
end
|
||||||
|
|
||||||
def go_resource name, &block
|
def go_resource name, &block
|
||||||
resource name, Resource::Go, &block
|
specs.each { |spec| spec.go_resource(name, &block) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def depends_on dep
|
def depends_on dep
|
||||||
|
@ -85,6 +85,10 @@ class SoftwareSpec
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def go_resource name, &block
|
||||||
|
resource name, Resource::Go, &block
|
||||||
|
end
|
||||||
|
|
||||||
def option_defined?(name)
|
def option_defined?(name)
|
||||||
options.include?(name)
|
options.include?(name)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user