Documentation
¶
Overview ¶
Package shellexec runs bounded shell commands with workspace-validated initial working directories and process-tree cleanup.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoShell = errors.New("shellexec: no shell found")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Root *workspace.Root
Shell string
DefaultTimeout time.Duration
MaxTimeout time.Duration
KillGrace time.Duration
Env []string
ExtraEnv map[string]string
OutputLimit outputlimit.Policy
}
Config defines process, environment, timeout, and output-capture policy.
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor holds immutable policy shared by independent command invocations.
type Result ¶
type Result struct {
Stdout string
Stderr string
ExitCode int
Signal string
TimedOut bool
Killed bool
Duration time.Duration
Dir string
StdoutReport outputlimit.Report
StderrReport outputlimit.Report
}
Result describes command output and process termination. A non-zero command exit is represented here and is not a Run error.
Click to show internal directories.
Click to hide internal directories.