Documentation
¶
Overview ¶
Package executor runs commands locally or over SSH.
Commands are always described as argv slices, never as shell strings. The local executor passes argv straight to exec.Command (no shell involved). The SSH executor must produce a string for the remote shell, so every element is single-quoted by ShellQuote before joining — the remote shell therefore sees each argv element as one literal word, and metacharacters in agent-supplied arguments cannot start a new command.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShellQuote ¶
ShellQuote wraps s in single quotes for POSIX shells, escaping embedded single quotes. The result is always exactly one shell word.
Types ¶
type Executor ¶
type Executor interface {
Run(ctx context.Context, argv []string) (Result, error)
Close() error
Name() string
}
Executor runs an argv on some machine.
Click to show internal directories.
Click to hide internal directories.