channel fixed
This commit is contained in:
parent
6c64284767
commit
487d69b298
|
@ -149,6 +149,7 @@ func (p *Project) watching() {
|
||||||
if p.Run {
|
if p.Run {
|
||||||
close(channel)
|
close(channel)
|
||||||
wr.Wait()
|
wr.Wait()
|
||||||
|
channel = make(chan bool)
|
||||||
}
|
}
|
||||||
err := p.fmt(event.Name[:i]+ext)
|
err := p.fmt(event.Name[:i]+ext)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
@ -233,16 +234,10 @@ func (p *Project) ignore(str string) bool {
|
||||||
|
|
||||||
// Routines launches the following methods: run, build, fmt, install
|
// Routines launches the following methods: run, build, fmt, install
|
||||||
func routines(p *Project, channel chan bool, wr *sync.WaitGroup) {
|
func routines(p *Project, channel chan bool, wr *sync.WaitGroup) {
|
||||||
channel = make(chan bool)
|
|
||||||
//err := p.fmt()
|
|
||||||
//if err == nil {
|
|
||||||
wr.Add(1)
|
wr.Add(1)
|
||||||
go p.build()
|
go p.build()
|
||||||
go p.install(channel, wr)
|
go p.install(channel, wr)
|
||||||
wr.Wait()
|
wr.Wait()
|
||||||
//} else {
|
|
||||||
// fmt.Println(Red(err))
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if a string is inArray
|
// check if a string is inArray
|
||||||
|
|
Loading…
Reference in New Issue