push OK, clone KO

This commit is contained in:
Hubert 2021-07-08 08:02:44 +02:00
parent 7f4978140e
commit 4f933e2526
1 changed files with 2 additions and 1 deletions

View File

@ -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())?;