refactor: Maintain single code path for package manager execution (#256)

* refactor: Maintain single code path for package manager execution

* fix: Avoid context leak during interactive TTY read

* fix: PTY flow handling

* fix: Linter fixes
This commit is contained in:
Abhisek Datta
2026-05-13 19:14:00 +05:30
committed by GitHub
parent 511a6d1c58
commit 3848cc78e0
7 changed files with 581 additions and 261 deletions
+17
View File
@@ -0,0 +1,17 @@
//go:build windows
package pty
import (
"context"
"io"
)
func readInput(ctx context.Context, src io.Reader, buf []byte) (int, error) {
select {
case <-ctx.Done():
return 0, ctx.Err()
default:
return src.Read(buf)
}
}