File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -246,12 +246,14 @@ func (c *runCommand) execute(_ *cobra.Command, _ []string) {
246246 }
247247 }()
248248
249- ctx := context .Background ()
249+ ctx , cancel := context .WithCancel ( context . Background () )
250250 if c .cfg .Run .Timeout > 0 {
251- var cancel context.CancelFunc
252251 ctx , cancel = context .WithTimeout (ctx , c .cfg .Run .Timeout )
253- defer cancel ()
254252 }
253+ defer cancel ()
254+
255+ deadline , ok := ctx .Deadline ()
256+ fmt .Println (deadline , ok )
255257
256258 if needTrackResources {
257259 go watchResources (ctx , trackResourcesEndCh , c .log , c .debugf )
@@ -269,7 +271,7 @@ func (c *runCommand) execute(_ *cobra.Command, _ []string) {
269271 }
270272 }
271273
272- c .setupExitCode (ctx )
274+ // c.setupExitCode(ctx)
273275}
274276
275277func (c * runCommand ) startTracing () error {
You can’t perform that action at this time.
0 commit comments