def handle(self) -> Optional[int]: from poetry.locations import REPOSITORY_CACHE_DIR if os.path.exists(str(REPOSITORY_CACHE_DIR)): caches = list(sorted(REPOSITORY_CACHE_DIR.iterdir())) if caches: for cache in caches: self.line("<info>{}</>".format(cache.name)) return 0 self.line("<warning>No caches found</>")
def handle(self) -> int | None: from poetry.locations import REPOSITORY_CACHE_DIR if os.path.exists(str(REPOSITORY_CACHE_DIR)): caches = sorted(REPOSITORY_CACHE_DIR.iterdir()) if caches: for cache in caches: self.line(f"<info>{cache.name}</>") return 0 self.line_error("<warning>No caches found</>") return None