From 35ccf06daeaf86176c1341dde4207c3b11653d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 23 May 2018 10:03:11 +0200 Subject: Fix some recently broken embedded templates And add tests for them. Fixes #4757 --- commands/hugo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands') diff --git a/commands/hugo.go b/commands/hugo.go index e2d447768..b898a9b7b 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -84,11 +84,11 @@ func Execute(args []string) Response { } if err == nil { - errCount := jww.LogCountForLevelsGreaterThanorEqualTo(jww.LevelError) + errCount := int(jww.LogCountForLevelsGreaterThanorEqualTo(jww.LevelError)) if errCount > 0 { err = fmt.Errorf("logged %d errors", errCount) } else if resp.Result != nil { - errCount = resp.Result.Log.LogCountForLevelsGreaterThanorEqualTo(jww.LevelError) + errCount = resp.Result.NumLogErrors() if errCount > 0 { err = fmt.Errorf("logged %d errors", errCount) } -- cgit v1.2.3