소스 검색

Ignore errors when killing on second Ctrl-C

Signed-off-by: Jaime Soriano Pastor <[email protected]>
Jaime Soriano Pastor 1 년 전
부모
커밋
5daed33c6a
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      pkg/compose/up.go

+ 4 - 1
pkg/compose/up.go

@@ -119,11 +119,14 @@ func (s *composeService) Up(ctx context.Context, project *types.Project, options
 					gracefulTeardown()
 				} else {
 					eg.Go(func() error {
-						return s.Kill(context.Background(), project.Name, api.KillOptions{
+						// Intentionally ignore errors, for cases where some
+						// of the containers are already stopped.
+						s.kill(context.Background(), project.Name, api.KillOptions{
 							Services: options.Create.Services,
 							Project:  project,
 							All:      true,
 						})
+						return nil
 					})
 					return nil
 				}