mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Fix globals being injected multiple times in repl
This commit is contained in:
parent
9f58414e99
commit
0116d405b2
1 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,8 @@ impl Runtime {
|
||||||
lua.set_app_data(Rc::downgrade(&lua));
|
lua.set_app_data(Rc::downgrade(&lua));
|
||||||
lua.set_app_data(Vec::<String>::new());
|
lua.set_app_data(Vec::<String>::new());
|
||||||
|
|
||||||
|
globals::inject_all(&lua).expect("Failed to inject globals");
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
lua,
|
lua,
|
||||||
args: Vec::new(),
|
args: Vec::new(),
|
||||||
|
@ -65,7 +67,6 @@ impl Runtime {
|
||||||
) -> Result<ExitCode, RuntimeError> {
|
) -> Result<ExitCode, 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);
|
||||||
globals::inject_all(&self.lua)?;
|
|
||||||
|
|
||||||
// Add error callback to format errors nicely + store status
|
// Add error callback to format errors nicely + store status
|
||||||
let got_any_error = Arc::new(AtomicBool::new(false));
|
let got_any_error = Arc::new(AtomicBool::new(false));
|
||||||
|
|
Loading…
Reference in a new issue