diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-04-08 15:24:19 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-04-11 13:25:02 -0700 |
commit | 20a75a9cfdddd8ba9dbf9ec033c006d275b46f08 (patch) | |
tree | a67b86017c91d3198265d1b43d86b99d5d9ca5b9 /lib/chef/mixin/notifying_block.rb | |
parent | 48798453a1348b4c5cf137aadb96e350e3f60773 (diff) | |
download | chef-20a75a9cfdddd8ba9dbf9ec033c006d275b46f08.tar.gz |
readability tweak
Diffstat (limited to 'lib/chef/mixin/notifying_block.rb')
-rw-r--r-- | lib/chef/mixin/notifying_block.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/mixin/notifying_block.rb b/lib/chef/mixin/notifying_block.rb index f07f94ba71..0ec9444be1 100644 --- a/lib/chef/mixin/notifying_block.rb +++ b/lib/chef/mixin/notifying_block.rb @@ -24,9 +24,11 @@ class Chef subcontext = subcontext_block(&block) Chef::Runner.new(subcontext).converge ensure + # recipes don't have a new_resource if respond_to?(:new_resource) - new_resource.updated_by_last_action(true) if - subcontext && subcontext.resource_collection.any?(&:updated?) + if subcontext && subcontext.resource_collection.any?(&:updated?) + new_resource.updated_by_last_action(true) + end end end end |