mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-26 03:11:05 +00:00
modules: Add some more output if modules download takes time
Closes #6519
This commit is contained in:
parent
dcde8af8c6
commit
14a1de14fb
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue