Skip to content

Commit

Permalink
crictl run: Rename --timeout/-t to --cancel-timeout/-T
Browse files Browse the repository at this point in the history
This streamlines the behavior with `crictl create` by changing the
`--timeout` to `--cancel-timeout`.

The timeout flag from the root command (`crictl -t`) can still be used
as fallback.

Signed-off-by: Sascha Grunert <[email protected]>
  • Loading branch information
saschagrunert committed Jun 13, 2024
1 parent fc92a8d commit 33976da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/crictl/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ var runPullFlags = []cli.Flag{
Usage: "Runtime handler to use. Available options are defined by the container runtime.",
},
&cli.DurationFlag{
Name: "timeout",
Aliases: []string{"t"},
Name: "cancel-timeout",
Aliases: []string{"T"},
Usage: "Seconds to wait for a container create request before cancelling the request",
},
&cli.DurationFlag{
Expand Down Expand Up @@ -638,7 +638,7 @@ var runContainerCommand = &cli.Command{
username: c.String("username"),
timeout: c.Duration("pull-timeout"),
},
timeout: c.Duration("timeout"),
timeout: c.Duration("cancel-timeout"),
}

runtimeClient, err := getRuntimeService(c, opts.timeout)
Expand Down

0 comments on commit 33976da

Please sign in to comment.