fix: 更新版本号至0.3.1并修复空参数问题

更新installer.lua、bios.lua和pkg.lua中的版本号至0.3.1
在pkg.lua中添加参数过滤逻辑,避免空参数导致的问题
This commit is contained in:
2025-09-01 22:10:50 +08:00
parent fb33b53b42
commit 625f959b4e
3 changed files with 12 additions and 4 deletions

View File

@@ -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") local fs = rawget(_G, "fs")
_G._RC_ROM_DIR = _RC_ROM_DIR or (...) and fs.exists("/leonos") and "/leonos" or "/rom" _G._RC_ROM_DIR = _RC_ROM_DIR or (...) and fs.exists("/leonos") and "/leonos" or "/rom"
@@ -32,7 +32,7 @@ local rc = {
_VERSION = { _VERSION = {
major = 0, major = 0,
minor = 3, minor = 3,
patch = 0 patch = 1
}, },
queueEvent = pull(os, "queueEvent"), queueEvent = pull(os, "queueEvent"),
startTimer = pull(os, "startTimer"), startTimer = pull(os, "startTimer"),

View File

@@ -381,4 +381,12 @@ local function main(args)
end end
-- 运行主函数 -- 运行主函数
main({...}) 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)

View File

@@ -1,5 +1,5 @@
-- LeonOS installer -- LeonOS installer
local INSTALLER_VERSION = "0.3.0" local INSTALLER_VERSION = "0.3.1"
local DEFAULT_ROM_DIR = "/leonos" local DEFAULT_ROM_DIR = "/leonos"
print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...") print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")