From 4f933e252660dd8e11de00bdfc6a48ec968a1602 Mon Sep 17 00:00:00 2001 From: Hubert Date: Thu, 8 Jul 2021 08:02:44 +0200 Subject: [PATCH] push OK, clone KO --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0eba8a7..75e470c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -148,9 +148,10 @@ async fn git_proto(payload : web::Payload, web::Path((owner, reponame)): web::Pa .stdin(Stdio::piped()); let mut p: Child = cmd.spawn()?; //p.stdin.take().unwrap().write() + let mut input = p.stdin.take().unwrap(); payload.try_for_each(|bytes| { // println!("{:?}", bytes); - p.stdin.take().unwrap().write(bytes.bytes()); + input.write(bytes.bytes()); future::ready(Ok(())) }).await; //io::copy(&mut req.take_payload(), &mut p.stdin.take().unwrap())?;