Skip to content

Commit

Permalink
Merge pull request #1457 from saschagrunert/pull-timeout-fix
Browse files Browse the repository at this point in the history
Fix `pull-timeout` flag for `crictl pull`
  • Loading branch information
k8s-ci-robot authored Jun 13, 2024
2 parents 6b68854 + 3689ac1 commit 532c0ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/crictl/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ var pullImageCommand = &cli.Command{
return err
}
}
timeout := c.Duration("timeout")
timeout := c.Duration("pull-timeout")
r, err := PullImageWithSandbox(imageClient, imageName, auth, sandbox, ann, timeout)
if err != nil {
return fmt.Errorf("pulling image: %w", err)
Expand Down Expand Up @@ -664,7 +664,7 @@ func PullImageWithSandbox(client internalapi.ImageManagerService, image string,
defer cancel()

if timeout > 0 {
logrus.Debugf("Using context with timeout of %s", timeout)
logrus.Debugf("Using pull context with timeout of %s", timeout)
ctx, cancel = context.WithTimeout(ctx, timeout)
defer cancel()
}
Expand Down

0 comments on commit 532c0ef

Please sign in to comment.