|
|
|
@ -125,6 +125,8 @@ $control_socket.puts "ready"
|
|
|
|
|
|
|
|
|
|
read_ios = [$control_socket, $stdin, pipes["stdout"], pipes["stderr"]] |
|
|
|
|
|
|
|
|
|
exit_code = "unknown" |
|
|
|
|
|
|
|
|
|
while read_ios.include?($control_socket) or read_ios.include?(pipes["stdout"]) or read_ios.include?(pipes["stderr"]) |
|
|
|
|
log "trace", read_ios.inspect |
|
|
|
|
|
|
|
|
@ -150,6 +152,10 @@ while read_ios.include?($control_socket) or read_ios.include?(pipes["stdout"]) o
|
|
|
|
|
if command != "done" |
|
|
|
|
log "error", "malformed response from github-fast-envd" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
if !arguments.empty? |
|
|
|
|
exit_code = arguments[0] |
|
|
|
|
end |
|
|
|
|
else |
|
|
|
|
log "warn", "received input from unknown stream" |
|
|
|
|
end |
|
|
|
@ -161,3 +167,9 @@ while read_ios.include?($control_socket) or read_ios.include?(pipes["stdout"]) o
|
|
|
|
|
|
|
|
|
|
read_ios = read_ios.select {|x| not x.closed?} |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
exit_code_is_numeric = Integer(exit_code) != nil rescue false |
|
|
|
|
|
|
|
|
|
if exit_code_is_numeric |
|
|
|
|
exit Integer(exit_code) |
|
|
|
|
end |
|
|
|
|