Skip to content

Commit

Permalink
modules: Add some more output if modules download takes time
Browse files Browse the repository at this point in the history
Closes #6519
  • Loading branch information
bep committed Nov 27, 2019
1 parent dcde8af commit 14a1de1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"strings"
"time"

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

"github.com/spf13/cast"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 14a1de1

Please sign in to comment.