Ensure output is shown even if no test command is given

This commit is contained in:
Sebastian Serth
2019-12-16 14:52:58 +01:00
parent ba4ea54e4f
commit fa229a581e
2 changed files with 6 additions and 1 deletions

View File

@ -235,7 +235,11 @@ class SubmissionsController < ApplicationController
# Filter out information about run_command, test_command, user or working directory
run_command = @submission.execution_environment.run_command % command_substitutions(sanitize_filename)
test_command = @submission.execution_environment.test_command % command_substitutions(sanitize_filename)
unless /root|workspace|#{run_command}|#{test_command}/.match(message)
if test_command.blank?
# If no test command is set, use the run_command for the RegEx below. Otherwise, no output will be displayed!
test_command = run_command
end
unless /root|workspace|#{run_command.gsub('.', '\.')}|#{test_command}/.match(message)
parse_message(message, 'stdout', tubesock)
end
end