languages/go: die on empty arrays if HOMEBREW_DEVELOPER

This commit is contained in:
Dominyk Tiller 2016-07-10 14:10:55 +01:00
parent e9925d6177
commit 373d927e37
No known key found for this signature in database
GPG Key ID: FE19AEFCF658C6F6

View File

@ -7,7 +7,13 @@ module Language
# The resource names should be the import name of the package,
# e.g. `resource "github.com/foo/bar"`
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) }
end
end