summaryrefslogtreecommitdiff
path: root/lib/chef/resource/execute.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2015-11-09 14:59:01 +0000
committerThom May <thom@chef.io>2015-11-09 15:04:04 +0000
commitdb8cda192518f7d3658573cb7974eb8a6e3dd6d1 (patch)
tree73ee6f11c120e0f15c7c2be1fd311725f9ad40b6 /lib/chef/resource/execute.rb
parent28487132e3d5469c07cbe790fb46edfd555d1c12 (diff)
downloadchef-db8cda192518f7d3658573cb7974eb8a6e3dd6d1.tar.gz
respond to review comments
the logic is now: if the resource is not sensitive, and if it's explicitly requested to be streamed or if the log level is info or debug, then we'll consider streaming it. If we're configured to send the output to the events stream, we'll do so. Otherwise, if we're not daemonized and have a TTY, we'll go to STDOUT
Diffstat (limited to 'lib/chef/resource/execute.rb')
-rw-r--r--lib/chef/resource/execute.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb
index 11c4ae045c..4f92a7ad35 100644
--- a/lib/chef/resource/execute.rb
+++ b/lib/chef/resource/execute.rb
@@ -49,6 +49,7 @@ class Chef
@umask = nil
@default_guard_interpreter = :execute
@is_guard_interpreter = false
+ @live_stream = false
end
def umask(arg=nil)
@@ -101,6 +102,13 @@ class Chef
)
end
+ def live_stream(arg=nil)
+ set_or_return(
+ :live_stream,
+ arg,
+ :kind_of => [ TrueClass, FalseClass ])
+ end
+
def path(arg=nil)
Chef::Log.warn "The 'path' attribute of 'execute' is not used by any provider in Chef 11 or Chef 12. Use 'environment' attribute to configure 'PATH'. This attribute will be removed in Chef 13."