summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/main.go b/main.go
index 25b0f6e86..189cac43e 100644
--- 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)
+ }
+ }
}