diff options
author | Thom May <thom@may.lt> | 2017-08-09 11:44:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-09 11:44:25 +0100 |
commit | 4b39f019ac84574515696ef0a644b8a226a0e2e2 (patch) | |
tree | 5c2a48a45966504cfaeaf675aed728fadc409e15 /lib | |
parent | a33025d1d2ec661bd64037e4f1e22713e3cf2c59 (diff) | |
parent | 7176a41258d5eb941ce3226c4b140dd7aeec8887 (diff) | |
download | chef-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')
-rw-r--r-- | lib/chef/exceptions.rb | 2 |
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 |