Skip to content

Commit

Permalink
fix: fix tar copy failed (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
sw1136562366 authored May 27, 2024
1 parent 5df0b42 commit 8524f55
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 8524f55

Please sign in to comment.