瀏覽代碼

reduce complexity (linter)

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 4 年之前
父節點
當前提交
86eadc7d67
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      pkg/compose/run.go

+ 4 - 0
pkg/compose/run.go

@@ -52,6 +52,10 @@ func (s *composeService) RunOneOffContainer(ctx context.Context, project *types.
 		return 0, nil
 	}
 
+	return s.runInteractive(ctx, containerID, opts)
+}
+
+func (s *composeService) runInteractive(ctx context.Context, containerID string, opts api.RunOptions) (int, error) {
 	r, err := s.getEscapeKeyProxy(opts.Stdin)
 	if err != nil {
 		return 0, err