summaryrefslogtreecommitdiff
path: root/lib/chef/runner.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/runner.rb')
-rw-r--r--lib/chef/runner.rb8
1 files changed, 6 insertions, 2 deletions
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 (<adam@chef.io>)
# Author:: Christopher Walters (<cw@chef.io>)
# Author:: Tim Hinderliter (<tim@chef.io>)
-# 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