diff piecrust/commands/builtin/baking.py @ 217:1f4c3dae1fe8

bake: Better error handling for site baking. The site baker now keeps track of whether any worker saw any error. It returns the current record after a bake. The `bake` command uses this return value to figure out what kind of exit code to return.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 31 Jan 2015 17:35:36 -0800
parents a47580a0955b
children 10f24c62b05b
line wrap: on
line diff
--- a/piecrust/commands/builtin/baking.py	Sat Jan 31 17:33:02 2015 -0800
+++ b/piecrust/commands/builtin/baking.py	Sat Jan 31 17:35:36 2015 -0800
@@ -65,8 +65,8 @@
         baker = Baker(
                 ctx.app, out_dir,
                 force=ctx.args.force)
-        baker.bake()
-        return True
+        record = baker.bake()
+        return record.success
 
     def _bakeAssets(self, ctx, out_dir):
         proc = ProcessorPipeline(