Timing broken on some docker images
vkitchen opened this issue · comments
The new timing code doesn't work with some of the docker images that already exist in the osirrc repos. Primarily the ones I've tested so far and are not working are atire-docker
, jass-docker
and jass2-docker
. These images all appear to be based on a distro which symlinks sh
to dash
but is cutdown to not include time
. Switching the timing command from
command = "sh -c 'time /search --json {}'"
to
command = "sh -c 'if which bash; then bash -c '\\''time /search --json {0}'\\''; else time /search --json {0}; fi'"
would solve this problem without requiring timely modifications to the images
I'll make the updates to the three images - I talked to Jimmy and we agreed that ensuring the time
package is installed (when you'd need to make sure bash
or time
is installed anyway with the other approach) is cleaner.