# HG changeset patch # User Ludovic Chabant # Date 1468777210 -7200 # Node ID 71a755512eb8a3df72d1bdf32952cfb4aae3abb6 # Parent ebf66b8b83f7c4dfe6de47ab308acd9313a25f69 chef: Don't crash when running `chef` outside of a website. diff -r ebf66b8b83f7 -r 71a755512eb8 piecrust/commands/builtin/publishing.py --- 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(