diff --git a/src/kamp/kak.rs b/src/kamp/kak.rs index 447c8a7..046aa31 100644 --- a/src/kamp/kak.rs +++ b/src/kamp/kak.rs @@ -29,7 +29,8 @@ where return Err(Error::other("cannot capture stdin of kak process")); }; - stdin.write_all(cmd.as_ref()).and_then(|_| child.wait()) + stdin.write_all(cmd.as_ref())?; + child.wait() } pub(crate) fn connect>(session: S, cmd: String) -> Result {