let shell_command_output_or_log ~host cmd =
begin Ketrew_host_io.get_shell_command_output host cmd
>>< function
| `Ok (o, _) -> return o
| `Error e ->
fail Log.(s "Command " % quote cmd % s " on " % Ketrew_host.log host
% s " failed: " % s (Ketrew_error.to_string e))
end