workflow fixed
This commit is contained in:
parent
d2ca592be2
commit
55198da4be
|
@ -22,18 +22,17 @@ func (p *Project) watching() {
|
||||||
channel, exit := make(chan bool, 1), make(chan bool, 1)
|
channel, exit := make(chan bool, 1), make(chan bool, 1)
|
||||||
p.path = p.Path
|
p.path = p.Path
|
||||||
watcher, err := fsnotify.NewWatcher()
|
watcher, err := fsnotify.NewWatcher()
|
||||||
if err != nil {
|
|
||||||
log.Println(strings.ToUpper(p.pname(p.Name, 1)), ":", p.Red.Bold(err.Error()))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
defer func() {
|
defer func() {
|
||||||
watcher.Close()
|
|
||||||
wg.Done()
|
wg.Done()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalln(p.pname(p.Name, 2), ":", p.Red.Bold(err.Error()))
|
||||||
|
return
|
||||||
|
}
|
||||||
p.cmd(exit)
|
p.cmd(exit)
|
||||||
if p.walks(watcher) != nil {
|
if p.walks(watcher) != nil {
|
||||||
log.Println(strings.ToUpper(p.pname(p.Name, 1)), ":", p.Red.Bold(err.Error()))
|
log.Fatalln(p.pname(p.Name, 2), ":", p.Red.Bold(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
go p.routines(channel, &wr)
|
go p.routines(channel, &wr)
|
||||||
|
|
Loading…
Reference in New Issue