Skip to content

Commit

Permalink
yegor256#304 handle unorthodox process exit
Browse files Browse the repository at this point in the history
  • Loading branch information
mbao01 committed Oct 11, 2021
1 parent 7bba343 commit 7e641ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion objects/exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ def run
out += stdout.read_nonblock(8) until stdout.eof?
err = stderr.read
code = thr.value.exitstatus
code = 1 if !thr.value.exited
unless code.zero?
raise Error.new(
code, "#{c} [#{code}]:\n#{err}\n#{out}"
code,
"#{c} [#{code}]:\n#{err}\n#{out}"
)
end
end
Expand Down

0 comments on commit 7e641ca

Please sign in to comment.