Skip to content

Commit

Permalink
fix: fix tar copy failed
Browse files Browse the repository at this point in the history
  • Loading branch information
sw1136562366 committed May 27, 2024
1 parent 5df0b42 commit 12719cb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/cri/criutils/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,8 @@ func CopyToContainerByTar(ctx context.Context, i cri.Interface, c *cri.Container
}()

execErrCh := make(chan error, 1)
execCtx, cancel := context.WithCancel(ctx)
defer cancel()
go func() {
_, err = i.Exec(execCtx, c, cri.ExecRequest{
_, err = i.Exec(context.Background(), c, cri.ExecRequest{
Cmd: []string{"tar", "-xmf", "-", "-C", filepath.Dir(dstPath)},
Env: nil,
WorkingDir: "",
Expand Down

0 comments on commit 12719cb

Please sign in to comment.