Skip to content

Commit

Permalink
Add cache list command
Browse files Browse the repository at this point in the history
This introduces a new cache sub-command that lists all available
caches.

Relates-to: python-poetry#1162
  • Loading branch information
abn committed Jun 23, 2019
1 parent 0857f32 commit d01a1b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
3 changes: 2 additions & 1 deletion poetry/console/commands/cache/cache.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from poetry.console.commands.cache.list import CacheListCommand
from ..command import Command

from .clear import CacheClearCommand
Expand All @@ -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)

0 comments on commit d01a1b6

Please sign in to comment.