hugo

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

git clone git://git.shimmy1996.com/hugo.git
commit 7cd69aaae8ab6f9234fac530e2d6687f0c72849e
parent 077b0fa71fee0e3eb848f59278fafe48745f04f1
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Fri, 11 Mar 2016 10:57:13 +0100

Exit with error code on any error

Fixes #740

Diffstat:
Mmain.go | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/main.go b/main.go
@@ -17,9 +17,15 @@ import (
 	"runtime"
 
 	"github.com/spf13/hugo/commands"
+	jww "github.com/spf13/jwalterweatherman"
+	"os"
 )
 
 func main() {
 	runtime.GOMAXPROCS(runtime.NumCPU())
 	commands.Execute()
+
+	if jww.LogCountForLevelsGreaterThanorEqualTo(jww.LevelError) > 0 {
+		os.Exit(-1)
+	}
 }