From 7d54004bfbe0d89369171f431f12cfbb9122216c Mon Sep 17 00:00:00 2001 From: Ryan Cragun Date: Fri, 31 Oct 2014 15:53:17 -0700 Subject: Block until child stream is empty --- lib/mixlib/shellout/unix.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/mixlib/shellout') diff --git a/lib/mixlib/shellout/unix.rb b/lib/mixlib/shellout/unix.rb index 66c4489..40d7efa 100644 --- a/lib/mixlib/shellout/unix.rb +++ b/lib/mixlib/shellout/unix.rb @@ -319,7 +319,7 @@ module Mixlib # assume everything went well. def propagate_pre_exec_failure begin - attempt_buffer_read + attempt_buffer_read until child_process_status.eof? e = Marshal.load(@process_status) raise(Exception === e ? e : "unknown failure: #{e.inspect}") rescue ArgumentError # If we get an ArgumentError error, then the exec was successful -- cgit v1.2.1