refactor(appdelete): 替换read模块为io.read以简化依赖

移除对read模块的依赖,直接使用内置的io.read函数进行用户输入确认
This commit is contained in:
2025-09-02 13:56:36 +08:00
parent efd64db639
commit 5bdd099ef1
2 changed files with 2 additions and 3 deletions

View File

@@ -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