Permalink
Browse files

Exit with error code on any error

Fixes #740
  • Loading branch information...
1 parent 077b0fa commit 7cd69aaae8ab6f9234fac530e2d6687f0c72849e @bep bep committed Mar 11, 2016
Showing with 6 additions and 0 deletions.
  1. +6 −0 main.go
View
@@ -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)
+ }
}

0 comments on commit 7cd69aa

Please sign in to comment.