summaryrefslogtreecommitdiff
path: root/lib/chef/mixin/notifying_block.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/mixin/notifying_block.rb')
-rw-r--r--lib/chef/mixin/notifying_block.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/chef/mixin/notifying_block.rb b/lib/chef/mixin/notifying_block.rb
index 2d6a82f493..d3f235f968 100644
--- a/lib/chef/mixin/notifying_block.rb
+++ b/lib/chef/mixin/notifying_block.rb
@@ -20,15 +20,13 @@ class Chef
module NotifyingBlock
def notifying_block(&block)
- begin
- subcontext = subcontext_block(&block)
- Chef::Runner.new(subcontext).converge
- ensure
- # recipes don't have a new_resource
- if respond_to?(:new_resource)
- if subcontext && subcontext.resource_collection.any?(&:updated?)
- new_resource.updated_by_last_action(true)
- end
+ subcontext = subcontext_block(&block)
+ Chef::Runner.new(subcontext).converge
+ ensure
+ # recipes don't have a new_resource
+ if respond_to?(:new_resource)
+ if subcontext && subcontext.resource_collection.any?(&:updated?)
+ new_resource.updated_by_last_action(true)
end
end
end