aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2019-11-27 09:51:47 +0100
committerBjørn Erik Pedersen <[email protected]>2019-11-27 09:51:47 +0100
commit14a1de14fb1ec93444ba5dd028fdad8959924545 (patch)
tree37ae68ba51d8cddb35ea8855b5f2f539c53c8256 /modules
parentdcde8af8c6ab39eb34b5e1d6030d1aa2fe6923ca (diff)
downloadhugo-14a1de14fb1ec93444ba5dd028fdad8959924545.tar.gz
hugo-14a1de14fb1ec93444ba5dd028fdad8959924545.zip
modules: Add some more output if modules download takes time
Closes #6519
Diffstat (limited to 'modules')
-rw-r--r--modules/collect.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/collect.go b/modules/collect.go
index 5f377c6dd..de71b50a6 100644
--- a/modules/collect.go
+++ b/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