MCPcopy Create free account
hub / github.com/Axosoft/git-rs / run_command

Function run_command

gitrs_server/src/dispatch/git_command/bisect/mod.rs:65–84  ·  view source on GitHub ↗
(
    build_command: CommandBuilder,
)

Source from the content-addressed store, hash-verified

63}
64
65fn run_command(
66 build_command: CommandBuilder,
67) -> impl Future<Item = String, Error = SubhandlerError<BisectError>> {
68 use error::protocol::Error::Process;
69 use error::protocol::ProcessError::{Encoding, Failed};
70
71 build_command()
72 .output_async()
73 .map_err(|_| SubhandlerError::Shared(Process(Failed)))
74 .and_then(|output| {
75 let output = if output.stdout.is_empty() {
76 output.stderr
77 } else {
78 output.stdout
79 };
80 str::from_utf8(&output)
81 .map(String::from)
82 .map_err(|_| SubhandlerError::Shared(Process(Encoding)))
83 })
84}
85
86type FinishBisectError = (SubhandlerError<BisectError>, state::Connection);
87

Callers 1

finish_bisectFunction · 0.85

Calls 1

SharedClass · 0.85

Tested by

no test coverage detected