summaryrefslogtreecommitdiff
path: root/lib/chef/exceptions.rb
diff options
context:
space:
mode:
authorTor Magnus Rakvåg <tm@intility.no>2017-08-07 16:07:05 +0200
committerTor Magnus Rakvåg <tm@intility.no>2017-08-07 16:08:03 +0200
commita01443cd55da0343eec924fa61f45e818335cd21 (patch)
treec6f94f12964d54fc3ffc3f2fb513e69bba5c09ea /lib/chef/exceptions.rb
parent0c8cd3a31adfe376bff41af716ff9c2a49f2838f (diff)
downloadchef-a01443cd55da0343eec924fa61f45e818335cd21.tar.gz
throw readable errors if multiple dsc resources are found
Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
Diffstat (limited to 'lib/chef/exceptions.rb')
-rw-r--r--lib/chef/exceptions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb
index a09a3a062c..68bcdf9eb5 100644
--- a/lib/chef/exceptions.rb
+++ b/lib/chef/exceptions.rb
@@ -515,7 +515,7 @@ This error is most often caused by network issues (proxies, etc) outside of chef
"Resource #{r['Name']} is a binary resource"
end
end
- super "Found multiple matching resources. #{matches_info.join("\n")}"
+ super "Found multiple matching resources of #{matches_info[0]["Module"]["Name"]}:\n#{(matches_info.map { |f| f["Module"]["Version"] }).uniq.join("\n")}"
end
end