made do_swift_command return the triple p, out, err