Skip to content
Permalink
Browse files
fix #2510
  • Loading branch information
ralsina committed Sep 24, 2016
1 parent 178f7c6 commit 54ffc11184ac793aa4ea36443a62e9a4dca4cb7e
Showing with 5 additions and 0 deletions.
  1. +5 −0 nikola/plugins/command/theme.py
@@ -231,6 +231,11 @@ def do_uninstall(self, name):
except Exception:
LOGGER.error('Unknown theme: {0}'.format(name))
return 1
# Don't uninstall builtin themes (Issue #2510)
blocked = os.path.dirname(utils.__file__)
if path.startswith(blocked):
LOGGER.error("Can't delete builtin theme: {0}".format(name))
return 1
LOGGER.warning('About to uninstall theme: {0}'.format(name))
LOGGER.warning('This will delete {0}'.format(path))
sure = utils.ask_yesno('Are you sure?')

0 comments on commit 54ffc11

Please sign in to comment.