Mercurial > piecrust2
diff piecrust/commands/builtin/publishing.py @ 781:71a755512eb8
chef: Don't crash when running `chef` outside of a website.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 17 Jul 2016 19:40:10 +0200 |
parents | 6abb436fea5b |
children | 58ae026b4c31 |
line wrap: on
line diff
--- a/piecrust/commands/builtin/publishing.py Sat Jul 16 15:04:54 2016 +0200 +++ b/piecrust/commands/builtin/publishing.py Sun Jul 17 19:40:10 2016 +0200 @@ -26,6 +26,10 @@ action='store_true', help="Only preview what the publisher would do.") + # Don't setup anything for a null app. + if app.root_dir is None: + return + subparsers = parser.add_subparsers() for pub in app.publishers: p = subparsers.add_parser(