From daa39336fb409a4033ea8bc56f50ce9d97a98345 Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Tue, 12 May 2020 14:19:18 +0200 Subject: [PATCH] Fix happy path for scoring --- lib/docker_client.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/docker_client.rb b/lib/docker_client.rb index a5d3f5df..85972135 100644 --- a/lib/docker_client.rb +++ b/lib/docker_client.rb @@ -452,7 +452,8 @@ class DockerClient output = nil Timeout.timeout(@execution_environment.permitted_execution_time.to_i - 29) do # TODO: check phusion doku again if we need -i -t options here - output = container.exec(['bash', '-c', "#{command} > /proc/1/fd/1 2> /proc/1/fd/2"], tty: false) + # https://stackoverflow.com/questions/363223/how-do-i-get-both-stdout-and-stderr-to-go-to-the-terminal-and-a-log-file + output = container.exec(['bash', '-c', "#{command} 1> >(tee /proc/1/fd/1) 2> >(tee /proc/1/fd/2 >&2)"], tty: false) end Rails.logger.debug 'output from container.exec' Rails.logger.debug output