ref: f3e9cbc7bd105ff63f1abcec9e1daf9411473c5c
parent: c1942e915afb0b0be569e5c150a4434e0890fa4b
author: Kartik Singhal <[email protected]>
date: Fri Oct 31 07:43:44 EDT 2014
Fix #593 problem with `hugo -w`
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -352,10 +352,10 @@
}
if static_changed {
- fmt.Print("Static file changed, syncing\n\n")
+ jww.FEEDBACK.Println("Static file changed, syncing\n")
utils.StopOnErr(copyStatic(), fmt.Sprintf("Error copying static files to %s", helpers.AbsPathify(viper.GetString("PublishDir"))))
- if !viper.GetBool("DisableLiveReload") {
+ if !BuildWatch && !viper.GetBool("DisableLiveReload") {
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initalized
// force refresh when more than one file
@@ -376,7 +376,7 @@
fmt.Println(time.Now().Format(layout))
utils.StopOnErr(buildSite(true))
- if !viper.GetBool("DisableLiveReload") {
+ if !BuildWatch && !viper.GetBool("DisableLiveReload") {
// Will block forever trying to write to a channel that nobody is reading if livereload isn't initalized
livereload.ForceRefresh()
}