mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
clean-unused-caches: Handle non-existent yarn cache.
This commit is contained in:
committed by
Tim Abbott
parent
08f6214829
commit
ba25580b19
@@ -20,6 +20,7 @@ def remove_unused_versions_dir(args: argparse.Namespace) -> None:
|
||||
can always remove the cache entirely.
|
||||
"""
|
||||
current_version_dir = os.path.join(YARN_CACHE_PATH, CURRENT_VERSION)
|
||||
try:
|
||||
dirs_to_purge = set(
|
||||
[
|
||||
os.path.join(YARN_CACHE_PATH, directory)
|
||||
@@ -27,6 +28,8 @@ def remove_unused_versions_dir(args: argparse.Namespace) -> None:
|
||||
if directory != CURRENT_VERSION
|
||||
]
|
||||
)
|
||||
except FileNotFoundError:
|
||||
return
|
||||
|
||||
may_be_perform_purging(
|
||||
dirs_to_purge,
|
||||
|
||||
Reference in New Issue
Block a user