@@ -435,8 +435,7 @@ func detectEmbeddedTmux(ctx context.Context, k devShellExecutor, namespace, pod
435435}
436436
437437func installEmbeddedTmux (ctx context.Context , k devShellExecutor , namespace , pod , installer string , progress func (string )) (bool , string , error ) {
438- installCtx , cancel := context .WithTimeout (ctx , 3 * time .Minute )
439- defer cancel ()
438+ installCtx := ctx
440439 if progress != nil && installer != "" && installer != "none" {
441440 ticker := time .NewTicker (10 * time .Second )
442441 defer ticker .Stop ()
@@ -458,8 +457,11 @@ func installEmbeddedTmux(ctx context.Context, k devShellExecutor, namespace, pod
458457 var raw bytes.Buffer
459458 err := k .StreamShInContainer (installCtx , namespace , pod , "dev" , script , & raw , & raw )
460459 if err != nil {
461- if errors .Is (installCtx .Err (), context .DeadlineExceeded ) {
462- return false , "" , fmt .Errorf ("timed out while installing tmux via %s; inspect %s in the dev container" , installer , embeddedTmuxLogPath )
460+ if errors .Is (ctx .Err (), context .DeadlineExceeded ) {
461+ return false , "" , fmt .Errorf ("tmux install cancelled after timeout via parent context; inspect %s in the dev container" , embeddedTmuxLogPath )
462+ }
463+ if errors .Is (ctx .Err (), context .Canceled ) {
464+ return false , "" , fmt .Errorf ("tmux install cancelled; inspect %s in the dev container" , embeddedTmuxLogPath )
463465 }
464466 return false , "" , err
465467 }
0 commit comments