This commit is contained in:
songzhibin97
2020-11-16 21:31:38 +08:00
parent b6843e04d5
commit e02e70ff26
2 changed files with 4 additions and 2 deletions

View File

@@ -50,6 +50,9 @@ func newT(f func(chan struct{}) error) *T {
}
func (t *T) AddTask() {
if len(t.ch) == 1 {
return
}
t.Lock()
defer t.Unlock()
if len(t.ch) == 1 {
@@ -90,7 +93,7 @@ func (t *T) DefaultF(ch chan struct{}) error {
if runtime.GOOS != "windows" && err == nil {
_, err := exec.LookPath("make")
if err == nil {
cmd = exec.Command("make")
cmd = exec.Command("make", "run")
goto makefile
}
}