languages/go: die on empty arrays if HOMEBREW_DEVELOPER
This commit is contained in:
parent
e9925d6177
commit
373d927e37
@ -7,7 +7,13 @@ module Language
|
|||||||
# The resource names should be the import name of the package,
|
# The resource names should be the import name of the package,
|
||||||
# e.g. `resource "github.com/foo/bar"`
|
# e.g. `resource "github.com/foo/bar"`
|
||||||
def self.stage_deps(resources, target)
|
def self.stage_deps(resources, target)
|
||||||
opoo "tried to stage empty resources array" if resources.empty?
|
if resources.empty?
|
||||||
|
if ARGV.homebrew_developer?
|
||||||
|
odie "tried to stage empty Language::Go resources array"
|
||||||
|
else
|
||||||
|
opoo "tried to stage empty Language::Go resources array"
|
||||||
|
end
|
||||||
|
end
|
||||||
resources.grep(Resource::Go) { |resource| resource.stage(target) }
|
resources.grep(Resource::Go) { |resource| resource.stage(target) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user