summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Cragun <me@ryan.ec>2014-10-31 15:53:17 -0700
committerRyan Cragun <me@ryan.ec>2014-10-31 15:53:17 -0700
commit7d54004bfbe0d89369171f431f12cfbb9122216c (patch)
tree85dcdb6d23598be1dde1ed1c16ab40997063a02e
parent634d75819af2f56699516e263a566142993a02fb (diff)
downloadmixlib-shellout-ryan/issue_2062_12.tar.gz
Block until child stream is emptyryan/issue_2062_12
-rw-r--r--lib/mixlib/shellout/unix.rb2
1 files changed, 1 insertions, 1 deletions
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