Skip to content
Permalink
Browse files

modules: Add some more output if modules download takes time

Closes #6519
  • Loading branch information
bep committed Nov 27, 2019
1 parent dcde8af commit 14a1de14fb1ec93444ba5dd028fdad8959924545
Showing with 7 additions and 0 deletions.
  1. +7 −0 modules/collect.go
@@ -21,6 +21,7 @@ import (
"strings"
"time"

"github.com/bep/debounce"
"github.com/gohugoio/hugo/common/loggers"

"github.com/spf13/cast"
@@ -470,6 +471,12 @@ func (c *collector) applyThemeConfig(tc *moduleAdapter) error {

func (c *collector) collect() {
defer c.logger.PrintTimerIfDelayed(time.Now(), "hugo: collected modules")
d := debounce.New(2 * time.Second)
d(func() {
c.logger.FEEDBACK.Println("hugo: downloading modules …")
})
defer d(func() {})

if err := c.initModules(); err != nil {
c.err = err
return

0 comments on commit 14a1de1

Please sign in to comment.
You can’t perform that action at this time.