mirror of
https://github.com/lune-org/lune.git
synced 2025-04-10 21:40:54 +01:00
feat(Runtime): return raw exit code as i32
instead of ExitCode
This commit is contained in:
parent
902c89acab
commit
13198e1851
1 changed files with 3 additions and 3 deletions
|
@ -64,7 +64,7 @@ impl Runtime {
|
||||||
&mut self,
|
&mut self,
|
||||||
script_name: impl AsRef<str>,
|
script_name: impl AsRef<str>,
|
||||||
script_contents: impl AsRef<[u8]>,
|
script_contents: impl AsRef<[u8]>,
|
||||||
) -> Result<(ExitCode, Vec<Value>), RuntimeError> {
|
) -> Result<(i32, Vec<Value>), RuntimeError> {
|
||||||
// Create a new scheduler for this run
|
// Create a new scheduler for this run
|
||||||
let sched = Scheduler::new(&self.lua);
|
let sched = Scheduler::new(&self.lua);
|
||||||
|
|
||||||
|
@ -93,13 +93,13 @@ impl Runtime {
|
||||||
.into_vec();
|
.into_vec();
|
||||||
|
|
||||||
Ok((
|
Ok((
|
||||||
ExitCode::from(sched.get_exit_code().unwrap_or({
|
sched.get_exit_code().unwrap_or({
|
||||||
if got_any_error.load(Ordering::SeqCst) {
|
if got_any_error.load(Ordering::SeqCst) {
|
||||||
1
|
1
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
}) as u8),
|
}),
|
||||||
thread_res,
|
thread_res,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue