浏览代码

Merge pull request #101674 from AThousandShips/cache_purge_fix

[Buildsystem] Break after purging cache
Rémi Verschelde 9 月之前
父节点
当前提交
36a62d0c6a
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      methods.py

+ 2 - 1
methods.py

@@ -847,8 +847,9 @@ def clean_cache(cache_path: str, cache_limit: int, verbose: bool) -> None:
                 except OSError:
                     print_error(f'Failed to remove cache file "{file}"; skipping.')
                     count -= 1
-            if verbose:
+            if verbose and count:
                 print_info(f"Purged {count} file{'s' if count else ''} from cache.")
+            break
 
 
 def prepare_cache(env) -> None: