Exit with error code on any error

Fixes #740
This commit is contained in:
Bjørn Erik Pedersen 2016-03-11 10:57:13 +01:00
parent 077b0fa71f
commit 7cd69aaae8

View file

@ -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)
}
}