summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-07-06 16:32:19 -0700
committerGitHub <noreply@github.com>2020-07-06 16:32:19 -0700
commit293e9ebf31ec6912aaf78d5563a417d859aa78dd (patch)
tree10ca23a43512d9dc662a737c088bf23dc4f60598
parent873f8592c06235e2102745de87f976c33be06709 (diff)
parent3b8d658ac3d027915ca25b1c62ea3bc1a5bfcca2 (diff)
downloadchef-293e9ebf31ec6912aaf78d5563a417d859aa78dd.tar.gz
Merge pull request #10117 from chef/cb_override_warning
Fix warning message for cb / core resource conflict
-rw-r--r--lib/chef/node_map.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/chef/node_map.rb b/lib/chef/node_map.rb
index 0237c39f70..dcf6e8969c 100644
--- a/lib/chef/node_map.rb
+++ b/lib/chef/node_map.rb
@@ -35,10 +35,13 @@
#
# XXX: confusingly, in the *_priority_map the :klass may be an array of Strings of class names
#
+
+require_relative "dist"
+
class Chef
class NodeMap
COLLISION_WARNING = <<~EOH.gsub(/\s+/, " ").strip
- %{type_caps} %{key} from the client is overriding the %{type} from a cookbook. Please upgrade your cookbook
+ %{type_caps} %{key} built into %{client_name} is being overridden by the %{type} from a cookbook. Please upgrade your cookbook
or remove the cookbook from your run_list.
EOH
@@ -83,7 +86,7 @@ class Chef
else
klass.superclass.to_s
end
- Chef::Log.warn( COLLISION_WARNING % { type: type_of_thing, key: key, type_caps: type_of_thing.capitalize } )
+ Chef::Log.warn( COLLISION_WARNING % { type: type_of_thing, key: key, type_caps: type_of_thing.capitalize, client_name: Chef::Dist::PRODUCT } )
end
# The map is sorted in order of preference already; we just need to find