Skip to content

Commit 62e0e7d

Browse files
creating is_main module
1 parent f7f809e commit 62e0e7d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

luasrc/main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private_vibescript.internal_main = function()
7070
if action == private_vibescript.SET_MODEL_AS_DEFAULT then
7171
return private_vibescript.set_model_as_default()
7272
end
73-
load_global_module(action)
73+
load_global_module(action,true)
7474
end
7575

7676
private_vibescript.main = function()

luasrc/module_load.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load_global_module = function(script_name)
1+
load_global_module = function(script_name,is_main)
22

33
filename = script_name
44
local found_filename = false
@@ -33,8 +33,10 @@ load_global_module = function(script_name)
3333
end
3434
error("File ("..script_name..") does not exist",0)
3535
end
36-
36+
3737
script_dir_name = dtw.newPath(filename).get_dir()
38+
is_main_script = is_main
3839
dofile(filename)
40+
is_main_script = false
3941

4042
end

0 commit comments

Comments
 (0)