commands: Make sure build error is logged in watch mode - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 2320c5682c4474ea341ef1c2aee01bc2f8283d6e
DIR parent 41857d036d5c02b4204e455111b98bf8e8caa402
HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Tue, 21 Feb 2017 09:46:56 +0100
commands: Make sure build error is logged in watch mode
See #3062
Diffstat:
M commands/hugo.go | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
DIR diff --git a/commands/hugo.go b/commands/hugo.go
@@ -943,7 +943,9 @@ func (c *commandeer) newWatcher(port int) error {
const layout = "2006-01-02 15:04 -0700"
c.Logger.FEEDBACK.Println(time.Now().Format(layout))
- c.rebuildSites(dynamicEvents)
+ if err := c.rebuildSites(dynamicEvents); err != nil {
+ c.Logger.ERROR.Println("Failed to rebuild site:", err)
+ }
if !buildWatch && !c.Cfg.GetBool("disableLiveReload") {
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initialized