diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-04-08 15:22:07 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-04-08 15:22:07 -0700 |
commit | 42620310405a923889b171298b1ae01ed05ef60b (patch) | |
tree | 89bf0bd6867d40ecfc4d0db7fb3e8e91ca99a505 | |
parent | b03c91c4eb67e204f08fd49253f1c9e23fa6d8ce (diff) | |
download | chef-42620310405a923889b171298b1ae01ed05ef60b.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 |