Skip to content

Commit

Permalink
Don't error out on webc/wasi run when exiting normaly (#3691)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb authored Mar 20, 2023
1 parent fbd6fc4 commit 3413617
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/wasi/src/runners/wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ impl crate::runners::Runner for WasiRunner {
builder.set_runtime(Arc::new(rt));
}

builder.run(module)?;
let res = builder.run(module);
match res {
Ok(()) => Ok(()),
Err(crate::WasiRuntimeError::Wasi(crate::WasiError::Exit(_))) => Ok(()),
Err(e) => Err(e),
}?;

Ok(())
}
Expand Down

0 comments on commit 3413617

Please sign in to comment.