let submit ?override_configuration t =
let active, dependencies = user_command_list t in
let configuration =
Ketrew_configuration.load_exn
(match override_configuration with
| Some c -> `Override c | None -> `Guess) in
match Lwt_main.run (
as_client ~configuration ~f:(fun ~client ->
add_targets client (active :: dependencies))
) with
| `Ok () -> ()
| `Error e ->
Log.(s "Run-error: " % s (Ketrew_error.to_string e) @ error);
failwith (Ketrew_error.to_string e)