aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2016-03-11 10:57:13 +0100
committerBjørn Erik Pedersen <[email protected]>2016-03-11 10:57:13 +0100
commit7cd69aaae8ab6f9234fac530e2d6687f0c72849e (patch)
tree50f15da7da1fd98a927c30ffd542c2f3bb2a7c8a /main.go
parent077b0fa71fee0e3eb848f59278fafe48745f04f1 (diff)
downloadhugo-7cd69aaae8ab6f9234fac530e2d6687f0c72849e.tar.gz
hugo-7cd69aaae8ab6f9234fac530e2d6687f0c72849e.zip
Exit with error code on any error
Fixes #740
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.go b/main.go
index f3b14d976..25b0f6e86 100644
--- 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)
+ }
}