Versions in this module Expand all Collapse all v0 v0.2.0 Oct 3, 2026 v0.1.0 Oct 1, 2026 Changes in this version + const DefaultCommandTimeout + type CmdResult struct + DurationMs int64 + ExitCode int + Stderr string + Stdout string + type CommandExecutor interface + Execute func(ctx context.Context, name string, args []string, cwd string) (string, error) + ExecuteWithStdin func(ctx context.Context, name string, args []string, cwd string, stdin string) (string, error) + type Exec struct + func New(logger *slog.Logger, sudo bool) *Exec + func (e *Exec) RunCmd(ctx context.Context, name string, args []string) (string, error) + func (e *Exec) RunCmdFull(ctx context.Context, name string, args []string, cwd string, timeout int) (*CmdResult, error) + func (e *Exec) RunCmdImpl(ctx context.Context, name string, args []string, cwd string) (string, error) + func (e *Exec) RunCmdInDir(ctx context.Context, name string, args []string, cwd string) (string, error) + func (e *Exec) RunPrivilegedCmd(ctx context.Context, name string, args []string) (string, error) + func (e *Exec) RunPrivilegedCmdWithStdin(ctx context.Context, name string, args []string, stdin string) (string, error) + type Manager interface + RunCmd func(ctx context.Context, name string, args []string) (string, error) + RunCmdFull func(ctx context.Context, name string, args []string, cwd string, timeout int) (*CmdResult, error) + RunPrivilegedCmd func(ctx context.Context, name string, args []string) (string, error) + RunPrivilegedCmdWithStdin func(ctx context.Context, name string, args []string, stdin string) (string, error)