From 7c4670ce77cafb481477e9da75348a75b44c0393 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 16 Jan 2014 12:52:53 -0800 Subject: CHEF-4777: fix for fully qualifying recipes this makes it so that the recipes in the attribute will be fully qualified, and will avoid the problem of both "cookbook" and "cookbook::default" showing up. --- lib/chef/node.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/chef/node.rb') diff --git a/lib/chef/node.rb b/lib/chef/node.rb index eaae1ee148..69e5e05b01 100644 --- a/lib/chef/node.rb +++ b/lib/chef/node.rb @@ -249,8 +249,9 @@ class Chef # used by include_recipe to add recipes to the expanded run_list to be # saved back to the node and be searchable - def loaded_recipe(recipe_name) - automatic_attrs[:recipes] << recipe_name unless Array(self[:recipes]).include?(recipe_name) + def loaded_recipe(cookbook, recipe) + fully_qualified_recipe = "#{cookbook}::#{recipe}" + automatic_attrs[:recipes] << fully_qualified_recipe unless Array(self[:recipes]).include?(fully_qualified_recipe) end # Returns true if this Node expects a given role, false if not. -- cgit v1.2.1