Call Wait() after all launches have started

This commit is contained in:
Adam Cooper 2022-05-17 09:19:58 -04:00
parent 05ebff0260
commit 3c47906594

17
main.go
View file

@ -109,13 +109,16 @@ func launch(m model) tea.Cmd {
result += statusMsg(fmt.Sprintf("%v\n", err)) result += statusMsg(fmt.Sprintf("%v\n", err))
log.Fatalf("Error launching: %v\n", err) log.Fatalf("Error launching: %v\n", err)
} }
/* }
err = item.command.Wait() }
if err != nil {
result += statusMsg(fmt.Sprintf("%v\n", err)) for r, item := range m.choices {
log.Fatalf("Error during wait: %v\n", err) if _, ok := m.selected[r]; ok {
} err := item.command.Wait()
*/ if err != nil {
result += statusMsg(fmt.Sprintf("%v\n", err))
log.Fatalf("Error during Wait(): %v\n", err)
}
} }
} }