Skip to content

Commit c5c3934

Browse files
author
nix
committed
update lua wrapper
1 parent 983051f commit c5c3934

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

contrib/Installer/assets/main.lua

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,18 @@ function init()
354354
os.execute(cmd)
355355
version_file_path = mtfg_repo_path.."/funscript_editor/VERSION.txt"
356356
end
357-
local f = io.open(version_file_path)
358-
if f then
359-
for line in f:lines() do
360-
if string.find(string.lower(line), "v") then
361-
mtfgVersion = string.lower(line):gsub("v", "")
357+
if platform == "Linux, Nix" then
358+
mtfgVersion = "nixpkgs"
359+
else
360+
local f = io.open(version_file_path)
361+
if f then
362+
for line in f:lines() do
363+
if string.find(string.lower(line), "v") then
364+
mtfgVersion = string.lower(line):gsub("v", "")
365+
end
362366
end
367+
f:close()
363368
end
364-
f:close()
365369
end
366370
end
367371

0 commit comments

Comments
 (0)