hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit fdad91fd96bc4636bf3a957cdddce18b66473124
parent 5f3f60898cfe1c087841ec1fbd5ddc2916d0a2c6
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Sat, 13 Nov 2021 21:45:51 +0100

commands: Make sure pollInterval is always set

Fixes #9165

Diffstat:
Mcommands/hugo.go | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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