]> Cypherpunks.ru repositories - goredo.git/blobdiff - run.go
Prevent race
[goredo.git] / run.go
diff --git a/run.go b/run.go
index 3fd4168eef99a4f1feae35302af8abac03157d2e..7ca2a70d5c6f6359881cd6a0bdafba574db0d232 100644 (file)
--- a/run.go
+++ b/run.go
@@ -289,9 +289,11 @@ func runScript(tgt *Tgt, errs chan error, forced, traced bool) error {
                if StopIfMod {
                        return fmt.Errorf("%s externally modified", tgt)
                }
+               Jobs.Add(1)
                tracef(CWarn, "%s externally modified: not redoing", tgt)
                go func() {
                        errs <- nil
+                       Jobs.Done()
                }()
                return nil
        }