From 49c53400ea336b3c5034eeed71c9c6bf3d778557 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 12 Dec 2013 17:13:50 -0500 Subject: [PATCH] Bug fixed --- conf.go | 3 ++- watch.go | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/conf.go b/conf.go index 77e242f..e78dc41 100644 --- a/conf.go +++ b/conf.go @@ -40,7 +40,8 @@ var conf struct { Version int // gopm support Gopm struct { - Enable bool + Enable bool + Install bool } // Indicates whether execute "go install" before "go build". GoInstall bool `json:"go_install"` diff --git a/watch.go b/watch.go index 856f560..26b70a7 100644 --- a/watch.go +++ b/watch.go @@ -125,7 +125,7 @@ func Autobuild() { var err error // For applications use full import path like "github.com/.../.." // are able to use "go install" to reduce build time. - if conf.GoInstall { + if conf.GoInstall || conf.Gopm.Install { icmd := exec.Command(cmdName, "install") icmd.Stdout = os.Stdout icmd.Stderr = os.Stderr @@ -152,9 +152,6 @@ func Autobuild() { if err != nil { ColorLog("[ERRO] ============== Build failed ===================\n") - fmt.Print("Press 'enter' to rebuild...") - fmt.Scanln() - go Autobuild() return } ColorLog("[SUCC] Build was successful\n")