From 66015ba654469f4dacfd78d40b02aafee52bbf1b Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Mon, 11 Mar 2019 11:49:31 -0700 Subject: Extract Action Collection from Data Collector See the PR for details on this change. Signed-off-by: Lamont Granquist --- lib/chef/runner.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/chef/runner.rb') diff --git a/lib/chef/runner.rb b/lib/chef/runner.rb index 1c82439b57..d5dab75dfd 100644 --- a/lib/chef/runner.rb +++ b/lib/chef/runner.rb @@ -2,7 +2,7 @@ # Author:: Adam Jacob () # Author:: Christopher Walters () # Author:: Tim Hinderliter () -# Copyright:: Copyright 2008-2017, Chef Software Inc. +# Copyright:: Copyright 2008-2019, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -95,7 +95,11 @@ class Chef # Execute each resource. run_context.resource_collection.execute_each_resource do |resource| - Array(resource.action).each { |action| run_action(resource, action) } + begin + Array(resource.action).each { |action| run_action(resource, action) } + ensure + resource.executed_by_runner = true + end end rescue Exception => e -- cgit v1.2.1