summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2017-08-09 11:44:25 +0100
committerGitHub <noreply@github.com>2017-08-09 11:44:25 +0100
commit4b39f019ac84574515696ef0a644b8a226a0e2e2 (patch)
tree5c2a48a45966504cfaeaf675aed728fadc409e15 /lib/chef
parenta33025d1d2ec661bd64037e4f1e22713e3cf2c59 (diff)
parent7176a41258d5eb941ce3226c4b140dd7aeec8887 (diff)
downloadchef-4b39f019ac84574515696ef0a644b8a226a0e2e2.tar.gz
Merge pull request #6307 from Happycoil/better_multidsc_error
throw readable errors if multiple dsc resources are found
Diffstat (limited to 'lib/chef')
-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..5b470f574e 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 resources matching #{matches_info[0]["Module"]["Name"]}:\n#{(matches_info.map { |f| f["Module"]["Version"] }).uniq.join("\n")}"
end
end