Ver Fonte

pass errs to goroutine

Mohammed Nafees há 3 anos atrás
pai
commit
38ea0f19e8
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      api/server/handlers/environment/create.go

+ 2 - 2
api/server/handlers/environment/create.go

@@ -251,10 +251,10 @@ func autoDeployBranch(
 	for _, branch := range branches {
 		wg.Add(1)
 
-		go func(branch string) {
+		go func(errs []error, branch string) {
 			defer wg.Done()
 			errs = append(errs, createWorkflowDispatchForBranch(env, config, onlyNewDeployments, branch)...)
-		}(branch)
+		}(errs, branch)
 	}
 
 	wg.Wait()