From ceed8d3e71c0db938af808556916bd563175a7f9 Mon Sep 17 00:00:00 2001 From: augushong Date: Wed, 27 May 2026 21:42:52 +0800 Subject: [PATCH] =?UTF-8?q?feat(stack):=20CLI=20handleUse()=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20skipped=5Ffiles=20=E5=92=8C=20deleted=5Ffiles=20?= =?UTF-8?q?=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../command/admin/stack/AdminStackModeBase.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/extend/base/common/command/admin/stack/AdminStackModeBase.php b/extend/base/common/command/admin/stack/AdminStackModeBase.php index 0c602ad..4f6c3b6 100644 --- a/extend/base/common/command/admin/stack/AdminStackModeBase.php +++ b/extend/base/common/command/admin/stack/AdminStackModeBase.php @@ -99,6 +99,14 @@ class AdminStackModeBase extends Command $output->writeln("- {$file} <= {$sourceMode}"); } + $skippedFiles = $planData['skipped_files'] ?? []; + if (!empty($skippedFiles)) { + $output->warning('以下文件在该模式下不存在,将从项目根目录删除:'); + foreach ($skippedFiles as $skipped) { + $output->writeln("- [删除] {$skipped}"); + } + } + if (!$force && !$output->confirm($input, '确认执行覆盖切换?', true)) { $output->warning('已取消'); return; @@ -108,6 +116,11 @@ class AdminStackModeBase extends Command $output->info('模式切换完成'); $output->writeln('mode=' . $result['mode']); $output->writeln('backup_id=' . $result['backup_id']); + + $deletedFiles = $result['deleted_files'] ?? []; + if (!empty($deletedFiles)) { + $output->warning('已删除文件:' . implode(', ', $deletedFiles)); + } } protected function handleRollback(