We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c6bccb commit b198df8Copy full SHA for b198df8
pkg/commands/run.go
@@ -244,8 +244,14 @@ func (c *runCommand) execute(_ *cobra.Command, args []string) {
244
}
245
}()
246
247
- ctx, cancel := context.WithTimeout(context.Background(), c.cfg.Run.Timeout)
248
- defer cancel()
+ var ctx context.Context
+ if c.cfg.Run.Timeout > 0 {
249
+ var cancel context.CancelFunc
250
+ ctx, cancel = context.WithTimeout(context.Background(), c.cfg.Run.Timeout)
251
+ defer cancel()
252
+ } else {
253
+ ctx = context.Background()
254
+ }
255
256
if needTrackResources {
257
go watchResources(ctx, trackResourcesEndCh, c.log, c.debugf)
0 commit comments