diff --git a/Cargo.lock b/Cargo.lock index 8159d41..45561f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1489,8 +1489,7 @@ dependencies = [ [[package]] name = "mlua-luau-scheduler" version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13eabdbc57fa38cf0b604d98ce3431573c79a964aac56e09c16c240d36cb1bf" +source = "git+https://github.com/0x5eal/mlua-luau-scheduler-exitstatus.git#22d15b36499db93c46ec381a562a3d1f440d6d02" dependencies = [ "async-executor", "blocking", diff --git a/Cargo.toml b/Cargo.toml index 2c79be6..0c7b411 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,7 +84,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] } tokio = { version = "1.24", features = ["full", "tracing"] } os_str_bytes = { version = "7.0", features = ["conversions"] } -mlua-luau-scheduler = { version = "0.0.2" } +mlua-luau-scheduler = { git = "https://github.com/0x5eal/mlua-luau-scheduler-exitstatus.git" } mlua = { version = "0.9.6", features = [ "luau", "luau-jit", diff --git a/src/lune/mod.rs b/src/lune/mod.rs index b54c584..2d0821e 100644 --- a/src/lune/mod.rs +++ b/src/lune/mod.rs @@ -91,14 +91,15 @@ impl Runtime { None => Value::Nil.into_lua_multi(&self.lua), }? .into_vec(); + Ok(( - sched.get_exit_code().unwrap_or({ + ExitCode::from(sched.get_exit_code().unwrap_or({ if got_any_error.load(Ordering::SeqCst) { - ExitCode::FAILURE + 1 } else { - ExitCode::SUCCESS + 0 } - }), + }) as u8), thread_res, )) }