diff --git a/spec/support/shell_out.rb b/spec/support/shell_out.rb index 4417ac14b..4bb5b5202 100644 --- a/spec/support/shell_out.rb +++ b/spec/support/shell_out.rb @@ -2,6 +2,7 @@ class ShellOut WaitTimeout = Class.new(StandardError) + PROCESS_EXIT = "[PROCESS EXIT]" def self.command(command, env: {}, &block) new.command(command, env: env, &block) @@ -43,14 +44,14 @@ def command(command, env: {}) Process.kill('TERM', pid) wait_thr.value rescue Errno::ESRCH - puts "Process already exited." + @output << PROCESS_EXIT end end stdout_future.value stderr_future.value - output + @output end end end