comparison piecrust/commands/builtin/plugins.py @ 925:2394fd689590

plugins: The command works on an empty site too.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 01 Oct 2017 20:36:38 -0700
parents 58ae026b4c31
children
comparison
equal deleted inserted replaced
924:1bb704434ee2 925:2394fd689590
10 super(PluginsCommand, self).__init__() 10 super(PluginsCommand, self).__init__()
11 self.name = 'plugins' 11 self.name = 'plugins'
12 self.description = "Manage the plugins for the current website." 12 self.description = "Manage the plugins for the current website."
13 13
14 def setupParser(self, parser, app): 14 def setupParser(self, parser, app):
15 # Don't setup anything if this is a null app
16 # (for when `chef` is run from outside a website)
17 if app.root_dir is None:
18 return
19
20 subparsers = parser.add_subparsers() 15 subparsers = parser.add_subparsers()
21 p = subparsers.add_parser( 16 p = subparsers.add_parser(
22 'list', 17 'list',
23 help="Lists the plugins installed in the current website.") 18 help="Lists the plugins installed in the current website.")
24 p.add_argument( 19 p.add_argument(