changeset 726:6e92b5cd0163

purge: Delete the whole cache directory, not just the current sub-cache.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 29 May 2016 22:18:50 -0700
parents f1dd8f2e79e7
children e7481bbbb29f
files piecrust/commands/builtin/util.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/commands/builtin/util.py	Sun May 29 22:16:40 2016 -0700
+++ b/piecrust/commands/builtin/util.py	Sun May 29 22:18:50 2016 -0700
@@ -4,6 +4,7 @@
 import codecs
 import logging
 import yaml
+from piecrust import CACHE_DIR
 from piecrust.app import CONFIG_PATH, THEME_CONFIG_PATH
 from piecrust.commands.base import ChefCommand
 
@@ -63,7 +64,7 @@
         pass
 
     def run(self, ctx):
-        cache_dir = ctx.app.cache_dir
+        cache_dir = os.path.join(ctx.app.root_dir, CACHE_DIR)
         if cache_dir and os.path.isdir(cache_dir):
             logger.info("Purging cache: %s" % cache_dir)
             shutil.rmtree(cache_dir)