From d01a1b654c9f71d42712471271f38eecd4a154c6 Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Sun, 23 Jun 2019 03:41:39 +0200 Subject: [PATCH] Add cache list command This introduces a new cache sub-command that lists all available caches. Relates-to: #1162 --- docs/docs/cli.md | 12 ++++++++++++ poetry/console/commands/cache/cache.py | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/docs/cli.md b/docs/docs/cli.md index 717be699733..1f0d70b45a6 100644 --- a/docs/docs/cli.md +++ b/docs/docs/cli.md @@ -513,3 +513,15 @@ poetry env remove test-O3eWbxRl-py3.7 !!!note If your remove the currently activated virtualenv, it will be automatically deactivated. + +## cache + +The `cache` command regroups sub commands to interact with Poetry's cache. + +### cache list + +The `cache list` command lists Poetry's available caches. + +```bash +poetry cache list +``` diff --git a/poetry/console/commands/cache/cache.py b/poetry/console/commands/cache/cache.py index 9f80da7310d..b4c79fc19cc 100644 --- a/poetry/console/commands/cache/cache.py +++ b/poetry/console/commands/cache/cache.py @@ -1,3 +1,4 @@ +from poetry.console.commands.cache.list import CacheListCommand from ..command import Command from .clear import CacheClearCommand @@ -8,7 +9,7 @@ class CacheCommand(Command): name = "cache" description = "Interact with Poetry's cache" - commands = [CacheClearCommand()] + commands = [CacheClearCommand(), CacheListCommand()] def handle(self): return self.call("help", self._config.name)