fix cap request wg
@@ -42,7 +42,7 @@ func (a *App) CapRun(cmd *cobra.Command, args []string) error {
a.collector.AddTarget(tc)
}
}
- numTargets := len(a.collector.Targets)
+ numTargets := len(a.Config.Targets)
a.errCh = make(chan error, numTargets*2)
a.wg.Add(numTargets)
for tName := range a.Config.Targets {
