Jelajahi Sumber

[Buildsystem] Break after purging cache

A Thousand Ships 6 bulan lalu
induk
melakukan
b12ca37be6
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  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:
                 except OSError:
                     print_error(f'Failed to remove cache file "{file}"; skipping.')
                     print_error(f'Failed to remove cache file "{file}"; skipping.')
                     count -= 1
                     count -= 1
-            if verbose:
+            if verbose and count:
                 print_info(f"Purged {count} file{'s' if count else ''} from cache.")
                 print_info(f"Purged {count} file{'s' if count else ''} from cache.")
+            break
 
 
 
 
 def prepare_cache(env) -> None:
 def prepare_cache(env) -> None: