diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-04-08 15:22:07 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-04-11 13:25:02 -0700 |
commit | 48798453a1348b4c5cf137aadb96e350e3f60773 (patch) | |
tree | c94e68d6a172b73e3a3d6d6fe55f0ea5d5e890e5 | |
parent | 9ed7d6a880749090403ee6d78d5592a4fa212343 (diff) | |
download | chef-48798453a1348b4c5cf137aadb96e350e3f60773.tar.gz |
fix logic in updating new_resource
-rw-r--r-- | lib/chef/mixin/notifying_block.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/chef/mixin/notifying_block.rb b/lib/chef/mixin/notifying_block.rb index 9ac1b79bb8..f07f94ba71 100644 --- a/lib/chef/mixin/notifying_block.rb +++ b/lib/chef/mixin/notifying_block.rb @@ -24,9 +24,10 @@ class Chef subcontext = subcontext_block(&block) Chef::Runner.new(subcontext).converge ensure - new_resource.updated_by_last_action( - subcontext && subcontext.resource_collection.any?(&:updated?) - ) if respond_to?(:new_resource) + if respond_to?(:new_resource) + new_resource.updated_by_last_action(true) if + subcontext && subcontext.resource_collection.any?(&:updated?) + end end end |