hugo

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

git clone git://git.shimmy1996.com/hugo.git
commit ef0b9b511c104422cd1fbd8e6a85fb424ab9b827
parent 18a29964fad31e51a4aefa4523f6aaf00c829b92
Author: spf13 <steve.francia@gmail.com>
Date:   Mon, 16 Nov 2015 21:52:37 -0500

Handle sync (file copy) errors better)

Diffstat:
Mcommands/hugo.go | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/commands/hugo.go b/commands/hugo.go
@@ -331,7 +331,11 @@ func watchConfig() {
 }
 
 func build(watches ...bool) {
-	utils.CheckErr(copyStatic(), fmt.Sprintf("Error copying static files to %s", helpers.AbsPathify(viper.GetString("PublishDir"))))
+	err := copyStatic()
+	if err != nil {
+		fmt.Println(err)
+		utils.StopOnErr(err, fmt.Sprintf("Error copying static files to %s", helpers.AbsPathify(viper.GetString("PublishDir"))))
+	}
 	watch := false
 	if len(watches) > 0 && watches[0] {
 		watch = true
@@ -516,7 +520,11 @@ func NewWatcher(port int) error {
 
 				if staticChanged {
 					jww.FEEDBACK.Printf("Static file changed, syncing\n\n")
-					utils.StopOnErr(copyStatic(), fmt.Sprintf("Error copying static files to %s", helpers.AbsPathify(viper.GetString("PublishDir"))))
+					err := copyStatic()
+					if err != nil {
+						fmt.Println(err)
+						utils.StopOnErr(err, fmt.Sprintf("Error copying static files to %s", helpers.AbsPathify(viper.GetString("PublishDir"))))
+					}
 
 					if !BuildWatch && !viper.GetBool("DisableLiveReload") {
 						// Will block forever trying to write to a channel that nobody is reading if livereload isn't initalized