diff options
Diffstat (limited to 'lib/chef/exceptions.rb')
-rw-r--r-- | lib/chef/exceptions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index 2d7ac374cb..18423245a7 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -491,13 +491,13 @@ class Chef attr_reader :resources_found def initialize(resources_found) @resources_found = resources_found - matches_info = @resources_found.each do |r| + matches_info = @resources_found.each { |r| if r["Module"].nil? "Resource #{r["Name"]} was found in #{r["Module"]["Name"]}" else "Resource #{r["Name"]} is a binary resource" end - end + } super "Found multiple resources matching #{matches_info[0]["Module"]["Name"]}:\n#{(matches_info.map { |f| f["Module"]["Version"] }).uniq.join("\n")}" end end |