diff --git a/data/computercraft/lua/bios.lua b/data/computercraft/lua/bios.lua index 3cc742d..ebb9b59 100644 --- a/data/computercraft/lua/bios.lua +++ b/data/computercraft/lua/bios.lua @@ -1,4 +1,4 @@ -_G._HOST = _G._HOST .. " (LeonOS 0.3.0)" +_G._HOST = _G._HOST .. " (LeonOS 0.3.1)" local fs = rawget(_G, "fs") _G._RC_ROM_DIR = _RC_ROM_DIR or (...) and fs.exists("/leonos") and "/leonos" or "/rom" @@ -32,7 +32,7 @@ local rc = { _VERSION = { major = 0, minor = 3, - patch = 0 + patch = 1 }, queueEvent = pull(os, "queueEvent"), startTimer = pull(os, "startTimer"), diff --git a/data/computercraft/lua/rom/programs/pkg.lua b/data/computercraft/lua/rom/programs/pkg.lua index b8897bc..73e82ed 100644 --- a/data/computercraft/lua/rom/programs/pkg.lua +++ b/data/computercraft/lua/rom/programs/pkg.lua @@ -381,4 +381,12 @@ local function main(args) end -- 运行主函数 -main({...}) \ No newline at end of file +local args = {...} +-- 过滤掉可能的空参数 +local filtered_args = {} +for _, arg in ipairs(args) do + if arg and arg ~= "" then + table.insert(filtered_args, arg) + end +end +main(filtered_args) \ No newline at end of file diff --git a/installer.lua b/installer.lua index 2f9428e..fae6e10 100644 --- a/installer.lua +++ b/installer.lua @@ -1,5 +1,5 @@ -- LeonOS installer -local INSTALLER_VERSION = "0.3.0" +local INSTALLER_VERSION = "0.3.1" local DEFAULT_ROM_DIR = "/leonos" print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")