diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-02-21 09:41:56 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-02-21 09:41:56 +0100 |
commit | 41857d036d5c02b4204e455111b98bf8e8caa402 (patch) | |
tree | eeb92d46272d48e592c37ffe58f3de40dddaa881 /commands | |
parent | 75d855c086e68a3847ad5cb843073939df3b0d83 (diff) |
utils: Use local logger
Diffstat (limited to 'commands')
-rw-r--r-- | commands/hugo.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index 95e1c5864..ad9aa316c 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -366,7 +366,7 @@ func InitializeConfig(subCmdVs ...*cobra.Command) (*deps.DepsCfg, error) { cacheDir = cacheDir + helpers.FilePathSeparator } isDir, err := helpers.DirExists(cacheDir, cfg.Fs.Source) - utils.CheckErr(err) + utils.CheckErr(cfg.Logger, err) if !isDir { mkdir(cacheDir) } @@ -481,7 +481,7 @@ func (c *commandeer) watchConfig() { v.OnConfigChange(func(e fsnotify.Event) { c.Logger.FEEDBACK.Println("Config file changed:", e.Name) // Force a full rebuild - utils.CheckErr(c.recreateAndBuildSites(true)) + utils.CheckErr(c.Logger, c.recreateAndBuildSites(true)) if !c.Cfg.GetBool("disableLiveReload") { // Will block forever trying to write to a channel that nobody is reading if livereload isn't initialized livereload.ForceRefresh() @@ -504,7 +504,7 @@ func (c *commandeer) build(watches ...bool) error { if buildWatch { c.Logger.FEEDBACK.Println("Watching for changes in", c.PathSpec().AbsPathify(c.Cfg.GetString("contentDir"))) c.Logger.FEEDBACK.Println("Press Ctrl+C to stop") - utils.CheckErr(c.newWatcher(0)) + utils.CheckErr(c.Logger, c.newWatcher(0)) } return nil @@ -841,7 +841,7 @@ func (c *commandeer) newWatcher(port int) error { c.Logger.FEEDBACK.Printf("Syncing all static files\n") err := c.copyStatic() if err != nil { - utils.StopOnErr(err, fmt.Sprintf("Error copying static files to %s", publishDir)) + utils.StopOnErr(c.Logger, err, fmt.Sprintf("Error copying static files to %s", publishDir)) } } else { staticSourceFs := c.getStaticSourceFs() |