diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-03-14 21:39:00 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-03-14 21:39:00 +0100 |
commit | 4a2a8afff2021c8e967254c76c159147da7e78fa (patch) | |
tree | 3ad78ca33d50fa2b27d52cc8f7d516e80f92c1ac /commands/commandeer.go | |
parent | 79d517d86c02e879bc4a43ab86b817c589b61485 (diff) |
commands: Fix doLiveReload logic
Fixes #5754
Diffstat (limited to 'commands/commandeer.go')
-rw-r--r-- | commands/commandeer.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/commandeer.go b/commands/commandeer.go index 3939d3bd0..8abb6418d 100644 --- a/commands/commandeer.go +++ b/commands/commandeer.go @@ -304,7 +304,7 @@ func (c *commandeer) loadConfig(mustHaveConfigFile, running bool) error { } // Set some commonly used flags - c.doLiveReload = !c.h.buildWatch && !c.Cfg.GetBool("disableLiveReload") + c.doLiveReload = running && !c.Cfg.GetBool("disableLiveReload") c.fastRenderMode = c.doLiveReload && !c.Cfg.GetBool("disableFastRender") c.showErrorInBrowser = c.doLiveReload && !c.Cfg.GetBool("disableBrowserError") @@ -351,6 +351,7 @@ func (c *commandeer) loadConfig(mustHaveConfigFile, running bool) error { // to make that decision. irrelevantRe: regexp.MustCompile(`\.map$`), } + changeDetector.PrepareNew() fs.Destination = hugofs.NewHashingFs(fs.Destination, changeDetector) c.changeDetector = changeDetector |