Documentation
¶
Overview ¶
Package execx runs external programs with the release CLI's shared process policy.
Run resolves one executable, starts it without a shell, forwards configured output streams, retains a bounded stderr tail, and bounds waits on leaked child I/O. Tool adapters remain responsible for argument construction, domain validation, secret handling, output parsing, and error presentation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Command ¶
type Command struct {
// Program is the PATH name used when Path is empty.
Program string
// Path overrides Program when nonempty. Run resolves the selected value
// through [exec.LookPath] at invocation time.
Path string
// Args is the argument list excluding argv[0]. Run passes it directly to
// [exec.CommandContext] and never invokes a shell.
Args []string
// Dir is the child working directory. An empty value inherits the parent
// working directory.
Dir string
// Env is the child environment. A nil value inherits the parent
// environment; a nonnil value is used as-is.
Env []string
// Stdout receives child stdout. A nil value discards stdout.
Stdout io.Writer
// Stderr receives child stderr while the process runs. A nil value discards
// the live stream. Run retains a bounded tail independently.
Stderr io.Writer
}
Command describes one external program invocation.
type RunError ¶
type RunError struct {
// contains filtered or unexported fields
}
RunError reports a process start, wait, or nonzero-exit failure.
It retains the underlying error and a bounded stderr tail without retaining argv or the child environment.
func (*RunError) StderrTail ¶
StderrTail returns the bounded trailing stderr captured during the run.