Documentation
¶
Overview ¶
Package execx defines the injectable external-command runner the orchestration core uses for git, gh, and host CLIs. Commands are always argument vectors — never shell strings — so external input can never be shell-interpreted. A non-zero exit is data in Result, not an error: callers that need exit codes as information (PRD §16 reproduce-on-base) read them directly, and callers for whom non-zero means failure convert it themselves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct {
// Name is the executable name; the runner resolves it on PATH.
Name string
// Args is the argument vector. It is passed verbatim to the
// process and never shell-interpreted.
Args []string
// Dir is the working directory. It is required: an implicit
// inherited cwd would make command behavior depend on ambient
// process state, so an empty Dir is an error (fail closed).
Dir string
// Env holds KEY=VALUE pairs appended to os.Environ(). Later
// entries win, so callers can override inherited variables.
// nil adds nothing.
Env []string
// Stdin is the process input; nil means no input.
Stdin io.Reader
}
Cmd describes one external command invocation.
type Local ¶
type Local struct {
// LookPath resolves an executable name; defaults to exec.LookPath.
LookPath func(string) (string, error)
}
Local is the production Runner backed by os/exec.
type Result ¶
Result carries everything a caller needs to interpret an invocation that ran to completion.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package execxtest provides a scripted fake execx.Runner for transcript tests: each expected call is asserted in order and answered with a recorded result, so tests pin the exact argument vectors the core sends to git and gh without running either.
|
Package execxtest provides a scripted fake execx.Runner for transcript tests: each expected call is asserted in order and answered with a recorded result, so tests pin the exact argument vectors the core sends to git and gh without running either. |