Skip to content
Permalink
Browse files

commands: Fix doLiveReload logic

Fixes #5754
  • Loading branch information...
bep committed Mar 14, 2019
1 parent 79d517d commit 4a2a8afff2021c8e967254c76c159147da7e78fa
Showing with 2 additions and 1 deletion.
  1. +2 −1 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

0 comments on commit 4a2a8af

Please sign in to comment.
You can’t perform that action at this time.