DCP: Escape command for RegEx

This commit is contained in:
Sebastian Serth
2021-10-18 01:24:32 +02:00
parent 68c8f1dbdf
commit 2ad4eb7625

View File

@ -143,7 +143,7 @@ class Runner::Strategy::DockerContainerPool < Runner::Strategy
# Identification of PyLint output, change stream back to stdout and return event # Identification of PyLint output, change stream back to stdout and return event
@stream = 'stdout' @stream = 'stdout'
{'type' => @stream, 'data' => event_data} {'type' => @stream, 'data' => event_data}
when /#{@strategy.command}/ when /#{Regexp.quote(@strategy.command)}/
when /bash: cmd:canvasevent: command not found/ when /bash: cmd:canvasevent: command not found/
else else
{'type' => @stream, 'data' => event_data} {'type' => @stream, 'data' => event_data}