From 487d69b298ce6f4f8b2499bfb5931da4f2b5a572 Mon Sep 17 00:00:00 2001 From: alessio Date: Tue, 23 Aug 2016 16:32:25 +0200 Subject: [PATCH] channel fixed --- realize/watcher.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/realize/watcher.go b/realize/watcher.go index fb8a1f7..614e2b1 100644 --- a/realize/watcher.go +++ b/realize/watcher.go @@ -149,6 +149,7 @@ func (p *Project) watching() { if p.Run { close(channel) wr.Wait() + channel = make(chan bool) } err := p.fmt(event.Name[:i]+ext) if err == nil { @@ -233,16 +234,10 @@ func (p *Project) ignore(str string) bool { // Routines launches the following methods: run, build, fmt, install func routines(p *Project, channel chan bool, wr *sync.WaitGroup) { - channel = make(chan bool) - //err := p.fmt() - //if err == nil { wr.Add(1) go p.build() go p.install(channel, wr) wr.Wait() - //} else { - // fmt.Println(Red(err)) - //} } // check if a string is inArray