Skip to content

Commit

Permalink
fix #2510
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Sep 24, 2016
1 parent 178f7c6 commit 54ffc11
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nikola/plugins/command/theme.py
Expand Up @@ -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?')
Expand Down

0 comments on commit 54ffc11

Please sign in to comment.