summaryrefslogtreecommitdiff
path: root/lib/mixlib/shellout/windows.rb
diff options
context:
space:
mode:
authorHo-Sheng Hsiao <hosheng.hsiao@gmail.com>2012-03-30 23:17:44 -0400
committerHo-Sheng Hsiao <hosh@opscode.com>2012-05-10 14:51:43 -0400
commit8181e60de4fc960b942de37fb8866389c483635e (patch)
treeac3b4364108447fff11b5d9834f829350c1de528 /lib/mixlib/shellout/windows.rb
parent904ddb782ee87f70ac04634e232ef10f23948b1b (diff)
downloadmixlib-shellout-8181e60de4fc960b942de37fb8866389c483635e.tar.gz
[CHEF-2994][WINDOWS] Mixlib::ShellOut::Windows should push input into stdin
Diffstat (limited to 'lib/mixlib/shellout/windows.rb')
-rw-r--r--lib/mixlib/shellout/windows.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/mixlib/shellout/windows.rb b/lib/mixlib/shellout/windows.rb
index 00ebb2e..942f377 100644
--- a/lib/mixlib/shellout/windows.rb
+++ b/lib/mixlib/shellout/windows.rb
@@ -72,6 +72,11 @@ module Mixlib
#
process = Process.create(create_process_args)
begin
+ # Start pushing data into input
+ stdin_write << input if input
+
+ # Close pipe to kick things off
+ stdin_write.close
#
# Wait for the process to finish, consuming output as we go