mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Allow getJSON errors to be ignored
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing). Fixes #7866
This commit is contained in:
@@ -162,9 +162,8 @@ func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error {
|
||||
var b bytes.Buffer
|
||||
h.Metrics.WriteMetrics(&b)
|
||||
|
||||
h.Log.FEEDBACK.Printf("\nTemplate Metrics:\n\n")
|
||||
h.Log.FEEDBACK.Print(b.String())
|
||||
h.Log.FEEDBACK.Println()
|
||||
h.Log.Printf("\nTemplate Metrics:\n\n")
|
||||
h.Log.Println(b.String())
|
||||
}
|
||||
|
||||
select {
|
||||
@@ -183,7 +182,7 @@ func (h *HugoSites) Build(config BuildCfg, events ...fsnotify.Event) error {
|
||||
return err
|
||||
}
|
||||
|
||||
errorCount := h.Log.ErrorCounter.Count()
|
||||
errorCount := h.Log.LogCounters().ErrorCounter.Count()
|
||||
if errorCount > 0 {
|
||||
return fmt.Errorf("logged %d error(s)", errorCount)
|
||||
}
|
||||
|
Reference in New Issue
Block a user