summaryrefslogtreecommitdiff
path: root/lib/chef/provider/execute.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/execute.rb')
-rw-r--r--lib/chef/provider/execute.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/chef/provider/execute.rb b/lib/chef/provider/execute.rb
index 16de268258..200beb02ad 100644
--- a/lib/chef/provider/execute.rb
+++ b/lib/chef/provider/execute.rb
@@ -79,11 +79,7 @@ class Chef
end
def live_stream?
- !!new_resource.live_stream
- end
-
- def stream_to_formatter?
- Chef::Config[:stream_execute_output] && run_context.events.formatter?
+ Chef::Config[:stream_execute_output] || !!new_resource.live_stream
end
def stream_to_stdout?
@@ -102,7 +98,7 @@ class Chef
opts[:log_level] = :info
opts[:log_tag] = new_resource.to_s
if (Chef::Log.info? || live_stream?) && !sensitive?
- if stream_to_formatter?
+ if run_context.events.formatter?
opts[:live_stream] = Chef::EventDispatch::EventsOutputStream.new(run_context.events, :name => :execute)
elsif stream_to_stdout?
opts[:live_stream] = STDOUT