# HG changeset patch # User Ludovic Chabant # Date 1464585530 25200 # Node ID 6e92b5cd01635a90613a493eaa07aeb5e22230ac # Parent f1dd8f2e79e77c49ebb44162b03b08e47609ee6b purge: Delete the whole cache directory, not just the current sub-cache. diff -r f1dd8f2e79e7 -r 6e92b5cd0163 piecrust/commands/builtin/util.py --- 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)