summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2014-11-24 09:38:36 -0800
committerdanielsdeleo <dan@getchef.com>2014-11-24 09:38:36 -0800
commit77211bdafb783b9067aa1fb32cd8bfa026a9769f (patch)
treeac26c414b10fe339c9c7700769012e21cd20b43e
parent6ffe8cca0f88ceb0a1ec6eb0d1a721b6faf11f4a (diff)
downloadmixlib-shellout-77211bdafb783b9067aa1fb32cd8bfa026a9769f.tar.gz
Document input and live stream options to `new`
-rw-r--r--lib/mixlib/shellout.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/mixlib/shellout.rb b/lib/mixlib/shellout.rb
index 2b53d02..e0fb3cc 100644
--- a/lib/mixlib/shellout.rb
+++ b/lib/mixlib/shellout.rb
@@ -130,6 +130,17 @@ module Mixlib
# total amount of time that ShellOut waited on the child process without
# receiving any output (i.e., IO.select returned nil). Default is 60
# seconds. Note: the stdlib Timeout library is not used.
+ # * +input+: A String of data to be passed to the subcommand. This is
+ # written to the child process' stdin stream before the process is
+ # launched. The child's stdin stream will be a pipe, so the size of input
+ # data should not exceed the system's default pipe capacity (4096 bytes
+ # is a safe value, though on newer Linux systems the capacity is 64k by
+ # default).
+ # * +live_stream+: An IO or Logger-like object (must respond to the append
+ # operator +<<+) that will receive data as ShellOut reads it from the
+ # child process. Generally this is used to copy data from the child to
+ # the parent's stdout so that users may observe the progress of
+ # long-running commands.
# === Examples:
# Invoke find(1) to search for .rb files:
# find = Mixlib::ShellOut.new("find . -name '*.rb'")