shithub: hugo

Download patch

ref: 7cd69aaae8ab6f9234fac530e2d6687f0c72849e
parent: 077b0fa71fee0e3eb848f59278fafe48745f04f1
author: Bjørn Erik Pedersen <[email protected]>
date: Fri Mar 11 05:57:13 EST 2016

Exit with error code on any error

Fixes #740

--- a/main.go
+++ b/main.go
@@ -17,9 +17,15 @@
 	"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)
+	}
 }