From 5bdd099ef18f863404940a22de87e897f273f8af Mon Sep 17 00:00:00 2001 From: Leonmmcoset Date: Tue, 2 Sep 2025 13:56:36 +0800 Subject: [PATCH] =?UTF-8?q?refactor(appdelete):=20=E6=9B=BF=E6=8D=A2read?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B8=BAio.read=E4=BB=A5=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除对read模块的依赖,直接使用内置的io.read函数进行用户输入确认 --- data/computercraft/lua/rom/programs/appdelete.lua | 3 +-- installer.lua | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/data/computercraft/lua/rom/programs/appdelete.lua b/data/computercraft/lua/rom/programs/appdelete.lua index c22643d..96ec323 100644 --- a/data/computercraft/lua/rom/programs/appdelete.lua +++ b/data/computercraft/lua/rom/programs/appdelete.lua @@ -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 [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 diff --git a/installer.lua b/installer.lua index fccfb21..a09ed23 100644 --- a/installer.lua +++ b/installer.lua @@ -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..")...")