Skip to content

Commit 5daed33

Browse files
jsorianondeloof
authored andcommitted
Ignore errors when killing on second Ctrl-C
Signed-off-by: Jaime Soriano Pastor <[email protected]>
1 parent 5c1e5f3 commit 5daed33

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/compose/up.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,14 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
119119
gracefulTeardown()
120120
} else {
121121
eg.Go(func() error {
122-
return s.Kill(context.Background(), project.Name, api.KillOptions{
122+
// Intentionally ignore errors, for cases where some
123+
// of the containers are already stopped.
124+
s.kill(context.Background(), project.Name, api.KillOptions{
123125
Services: options.Create.Services,
124126
Project: project,
125127
All: true,
126128
})
129+
return nil
127130
})
128131
return nil
129132
}

0 commit comments

Comments
 (0)