Documentation
¶
Overview ¶
Package subprocess runs short, bounded probes of host executables (node, mise, package managers) with a wall-time limit and an output cap.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrProbeTimedOut = errors.New("bounded subprocess probe timed out")
ErrProbeTimedOut is Probe's shared timeout signal; every host subprocess probe in this package (Node/mise version and install-location detection) maps it onto its own domain error rather than leaking a generic message to a readiness/runtime consumer.
Functions ¶
func Probe ¶
func Probe(ctx context.Context, timeout time.Duration, maxOutput int64, name string, args ...string) (data []byte, exitErr, err error)
Probe runs name with args, capped at timeout wall clock and maxOutput bytes of stdout, so a hung or unbounded-output host tool fails closed rather than wedging the CLI. exitErr carries the process's own non-zero-exit error uninterpreted -- callers assign their own meaning (a non-zero mise exit means "no candidate"; a non-zero node exit means a real error) -- while err covers every other spawn/read failure, with ErrProbeTimedOut identifying a deadline specifically.
Types ¶
This section is empty.