Skip to content

Commit c5f1906

Browse files
committed
Fix update script
1 parent b257458 commit c5f1906

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/UpdateApply.lua

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
--
77

88
---@param opFileName string
9-
return function(opFileName)
9+
local function applyUpdate(opFileName)
1010
print("Applying update...")
1111
local opFile = io.open(opFileName, "r")
1212
if not opFile then
@@ -47,3 +47,14 @@ return function(opFileName)
4747
end
4848
end
4949
end
50+
51+
-- this file is used both as a module and as a script depending on the update
52+
-- mode. basic mode will spawn a process, while normal mode will use this as a
53+
-- module.
54+
55+
local opFileName = ...
56+
if opFileName then
57+
return applyUpdate(opFileName)
58+
end
59+
60+
return applyUpdate

0 commit comments

Comments
 (0)