mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
refactor(appdelete): 替换read模块为io.read以简化依赖
移除对read模块的依赖,直接使用内置的io.read函数进行用户输入确认
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
local fs = require("fs")
|
||||
local tu = require("textutils")
|
||||
local shell = require("shell")
|
||||
local read = require("read")
|
||||
|
||||
local function show_help()
|
||||
print("Usage: appdelete <application_name> [options]")
|
||||
@@ -41,7 +40,7 @@ local function delete_app(app_name, force)
|
||||
-- 确认删除
|
||||
if not force then
|
||||
print("Are you sure you want to delete '" .. app_name .. "'? (y/n)")
|
||||
local confirm = read()
|
||||
local confirm = io.read()
|
||||
if confirm ~= "y" and confirm ~= "yes" then
|
||||
print("Deletion cancelled.")
|
||||
return false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- LeonOS installer
|
||||
local INSTALLER_VERSION = "0.3.7 Beta 3"
|
||||
local INSTALLER_VERSION = "0.3.7 Beta 4"
|
||||
local DEFAULT_ROM_DIR = "/leonos"
|
||||
|
||||
print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")
|
||||
|
||||
Reference in New Issue
Block a user