Mercurial > piecrust2
comparison 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 |
comparison
equal
deleted
inserted
replaced
780:ebf66b8b83f7 | 781:71a755512eb8 |
---|---|
23 help="Log the publisher's output to a given file.") | 23 help="Log the publisher's output to a given file.") |
24 parser.add_argument( | 24 parser.add_argument( |
25 '--preview', | 25 '--preview', |
26 action='store_true', | 26 action='store_true', |
27 help="Only preview what the publisher would do.") | 27 help="Only preview what the publisher would do.") |
28 | |
29 # Don't setup anything for a null app. | |
30 if app.root_dir is None: | |
31 return | |
28 | 32 |
29 subparsers = parser.add_subparsers() | 33 subparsers = parser.add_subparsers() |
30 for pub in app.publishers: | 34 for pub in app.publishers: |
31 p = subparsers.add_parser( | 35 p = subparsers.add_parser( |
32 pub.target, | 36 pub.target, |