Skip to content

Commit

Permalink
Do not output "Process already exited" from ShellOut spec helper
Browse files Browse the repository at this point in the history
  • Loading branch information
bensheldon committed Apr 12, 2021
1 parent bde582b commit d876d5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/support/shell_out.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit d876d5d

Please sign in to comment.