瀏覽代碼

don't failed when trying to stop or rm services with no containers running

Signed-off-by: Guillaume Lours <[email protected]>
Guillaume Lours 3 年之前
父節點
當前提交
0ef4b90fae
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/compose/stop.go

+ 1 - 1
pkg/compose/stop.go

@@ -44,7 +44,7 @@ func (s *composeService) stop(ctx context.Context, projectName string, options a
 	}
 
 	project, err := s.projectFromName(containers, projectName, services...)
-	if err != nil {
+	if err != nil && !api.IsNotFoundError(err) {
 		return err
 	}