删除多余输出

This commit is contained in:
zw
2025-08-28 20:01:01 +08:00
parent 240c566456
commit 3ee10fbaf5
2 changed files with 3 additions and 18 deletions

View File

@@ -84,26 +84,14 @@ class DevDiskImageDeployer:
def deploy_all(self):
candidates = list(self._iter_version_dirs(self._src_dir))
if self.verbose:
if not candidates:
print("[WARN] 未发现任何版本目录(仅匹配 15 / 15.6 / 16.7 / 16.7.1 这种名字)")
else:
print("[INFO] 发现版本目录:")
for c in candidates:
print(f" - {c.name}")
copied = skipped = 0
for ver_dir in candidates:
dst = self._cache_dir / ver_dir.name
if dst.exists() and not self.overwrite:
if self.verbose:
print(f"[SKIP] 已存在:{dst}")
skipped += 1
continue
if dst.exists() and self.overwrite:
if self.verbose:
print(f"[INFO] 覆盖模式,删除:{dst}")
if not self.dry_run:
shutil.rmtree(dst)