diff options
author | Noah Kantrowitz <noah@coderanger.net> | 2016-09-02 18:14:40 -0700 |
---|---|---|
committer | Noah Kantrowitz <noah@coderanger.net> | 2016-09-02 18:38:59 -0700 |
commit | 1c990a11ebe360f5e85ac13626ce1e09e295f919 (patch) | |
tree | ba08b180ba24e1154e21eb3c4e0a12df642b4f46 /lib/chef/run_context | |
parent | cc96f2fc1e907c95778bb91e9ff2168a05e43656 (diff) | |
download | chef-1c990a11ebe360f5e85ac13626ce1e09e295f919.tar.gz |
Hook up the recipe_file_loaded event which was defined but not actually called.
This also extends two of the recipe events to get the recipe name in addition to the path because that's
usually useful for display. These arguments are both added at the end so the auto-magic argument trimmer will keep backwards compat.
Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
Diffstat (limited to 'lib/chef/run_context')
-rw-r--r-- | lib/chef/run_context/cookbook_compiler.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/run_context/cookbook_compiler.rb b/lib/chef/run_context/cookbook_compiler.rb index bdf3a1251c..b2a8d236a3 100644 --- a/lib/chef/run_context/cookbook_compiler.rb +++ b/lib/chef/run_context/cookbook_compiler.rb @@ -137,13 +137,14 @@ class Chef @events.recipe_load_start(run_list_expansion.recipes.size) run_list_expansion.recipes.each do |recipe| begin + path = resolve_recipe(recipe) @run_context.load_recipe(recipe) + @events.recipe_file_loaded(path, recipe) rescue Chef::Exceptions::RecipeNotFound => e @events.recipe_not_found(e) raise rescue Exception => e - path = resolve_recipe(recipe) - @events.recipe_file_load_failed(path, e) + @events.recipe_file_load_failed(path, e, recipe) raise end end |