aboutsummaryrefslogtreecommitdiffhomepage
path: root/commands/hugo.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2021-11-13 21:45:51 +0100
committerBjørn Erik Pedersen <[email protected]>2021-11-13 21:45:51 +0100
commitfdad91fd96bc4636bf3a957cdddce18b66473124 (patch)
treed87310562a6ae01ffbe6978342714339d5d845f6 /commands/hugo.go
parent5f3f60898cfe1c087841ec1fbd5ddc2916d0a2c6 (diff)
downloadhugo-fdad91fd96bc4636bf3a957cdddce18b66473124.tar.gz
hugo-fdad91fd96bc4636bf3a957cdddce18b66473124.zip
commands: Make sure pollInterval is always set
Fixes #9165
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 6be3776bc..d442a62b5 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -845,6 +845,10 @@ func (c *commandeer) newWatcher(pollIntervalStr string, dirList ...string) (*wat
c.logger.Printf("Use watcher with poll interval %v", pollInterval)
}
+ if pollInterval == 0 {
+ pollInterval = 500 * time.Millisecond
+ }
+
watcher, err := watcher.New(500*time.Millisecond, pollInterval, poll)
if err != nil {
return nil, err