diff options
author | Bjørn Erik Pedersen <[email protected]> | 2016-03-11 10:57:13 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2016-03-11 10:57:13 +0100 |
commit | 7cd69aaae8ab6f9234fac530e2d6687f0c72849e (patch) | |
tree | 50f15da7da1fd98a927c30ffd542c2f3bb2a7c8a | |
parent | 077b0fa71fee0e3eb848f59278fafe48745f04f1 (diff) | |
download | hugo-7cd69aaae8ab6f9234fac530e2d6687f0c72849e.tar.gz hugo-7cd69aaae8ab6f9234fac530e2d6687f0c72849e.zip |
Exit with error code on any error
Fixes #740
-rw-r--r-- | main.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) + } } |