diff options
Diffstat (limited to 'lib/chef/provider.rb')
-rw-r--r-- | lib/chef/provider.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb index 6d1985bbbb..fb5697fd0c 100644 --- a/lib/chef/provider.rb +++ b/lib/chef/provider.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Christopher Walters (<cw@chef.io>) -# Copyright:: Copyright 2008-2016, 2009-2018, Chef Software Inc. +# Copyright:: Copyright 2008-2016, 2009-2019, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -238,8 +238,10 @@ class Chef def compile_and_converge_action(&block) old_run_context = run_context @run_context = run_context.create_child + @run_context.resource_collection.unified_mode = new_resource.class.unified_mode + runner = Chef::Runner.new(@run_context) return_value = instance_eval(&block) - Chef::Runner.new(run_context).converge + runner.converge return_value ensure if run_context.resource_collection.any?(&:updated?) |