hugo

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

git clone git://git.shimmy1996.com/hugo.git
commit 9262c5b32f99d677b6878984e35dbd6a5b31fbd8
parent 2bea9d0ca19fb442803abf57171e89b9d824b154
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Mon, 27 Mar 2017 10:55:29 +0200

Exit -1 on ERROR in non-global logger

Fixes #3239

Diffstat:
Mmain.go | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/main.go b/main.go
@@ -16,9 +16,10 @@ package main
 import (
 	"runtime"
 
+	"os"
+
 	"github.com/spf13/hugo/commands"
 	jww "github.com/spf13/jwalterweatherman"
-	"os"
 )
 
 func main() {
@@ -28,4 +29,10 @@ func main() {
 	if jww.LogCountForLevelsGreaterThanorEqualTo(jww.LevelError) > 0 {
 		os.Exit(-1)
 	}
+
+	if commands.Hugo != nil {
+		if commands.Hugo.Log.LogCountForLevelsGreaterThanorEqualTo(jww.LevelError) > 0 {
+			os.Exit(-1)
+		}
+	}
 }