mirror of
https://github.com/lune-org/lune.git
synced 2025-04-20 03:43:49 +01:00
feat: proper error handling & error propagation
This commit is contained in:
parent
ad6b2a2364
commit
e1c316f20b
1 changed files with 6 additions and 6 deletions
|
@ -221,14 +221,14 @@ async fn spawn_command(
|
|||
if let Some(stdin) = stdin {
|
||||
let mut child_stdin = child.stdin.take().unwrap();
|
||||
|
||||
let stdin_writer_thread = task::spawn(async move {
|
||||
let _ = task::spawn(async move {
|
||||
let mut tee = AsyncTeeWriter::new(&mut child_stdin);
|
||||
tee.write_all(stdin.as_bytes()).await.unwrap();
|
||||
});
|
||||
tee.write_all(stdin.as_bytes()).await.into_lua_err()?;
|
||||
|
||||
stdin_writer_thread
|
||||
.await
|
||||
.expect("Tee writer for stdin errored");
|
||||
Ok::<(), LuaError>(())
|
||||
})
|
||||
.await
|
||||
.expect("Tee writer for stdin errored");
|
||||
}
|
||||
|
||||
if inherit_stdio {
|
||||
|
|
Loading…
Add table
Reference in a new issue