let get_shell_command_output ?timeout ?with_shell t cmd =
execute ?timeout t (override_shell ?with_shell t cmd)
>>= fun execution ->
match execution#exited with
| 0 -> return (execution#stdout, execution#stderr)
| n -> fail_host (`Non_zero (cmd, n))