From: Bjørn Erik Pedersen Date: Tue, 21 Feb 2017 08:46:56 +0000 (+0100) Subject: commands: Make sure build error is logged in watch mode X-Git-Tag: v0.19~33 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2320c5682c4474ea341ef1c2aee01bc2f8283d6e;p=brevno-suite%2Fhugo commands: Make sure build error is logged in watch mode See #3062 --- diff --git a/commands/hugo.go b/commands/hugo.go index ad9aa316..49b0fc7e 100644 --- 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