summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-07-06 14:55:18 -0700
committerTim Smith <tsmith84@gmail.com>2020-07-06 15:12:56 -0700
commit3b8d658ac3d027915ca25b1c62ea3bc1a5bfcca2 (patch)
tree10ca23a43512d9dc662a737c088bf23dc4f60598
parent873f8592c06235e2102745de87f976c33be06709 (diff)
downloadchef-3b8d658ac3d027915ca25b1c62ea3bc1a5bfcca2.tar.gz
Fix warning message for cb / core resource conflict
Update the message to reflect what's actually happening, remove the evil double space after the period, and use branding. Signed-off-by: Tim Smith <tsmith@chef.io>
-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