hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 2b46f3e51ee64aa3611ddc76197abf40d4f3644c
parent 190964c57bdd81ef1c0b7bf518c0a2b678794bcf
Author: bep <bjorn.erik.pedersen@gmail.com>
Date:   Fri,  9 Jan 2015 10:37:21 +0100

Do not exit server watch on error

Before this commit any error (typically a YAML typing error in front matter) would exit server on rebuild when running `hugo server -w`.

This is very annoying as it doesn't give you any chance to fix the typo other than doing a manual restart.

This commit fixes that by just logging these errors when these rebuilds happen when changes are detected.

Fixes #781

Diffstat:
Mcommands/hugo.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/commands/hugo.go b/commands/hugo.go
@@ -397,7 +397,7 @@ func NewWatcher(port int) error {
 					fmt.Print("\nChange detected, rebuilding site\n")
 					const layout = "2006-01-02 15:04 -0700"
 					fmt.Println(time.Now().Format(layout))
-					utils.StopOnErr(buildSite(true))
+					utils.CheckErr(buildSite(true))
 
 					if !BuildWatch && !viper.GetBool("DisableLiveReload") {
 						// Will block forever trying to write to a channel that nobody is reading if livereload isn't initalized