Expand description
A DECLARED command executed as an activity.
DeclaredCommandAction is the sibling of super::ShellAction, and the
difference is where the splitting happened. A ShellAction is handed a
command LINE and parses it into an argv here. A DeclaredCommandAction is
handed argvs that the AWL emitter already produced from a command
declaration — one argv per body line, the document’s exported environment
and working directory beside them — so nothing on this side ever holds a
string that could be re-split.
§The body ruling, honoured where the processes are
A command body’s lines run SEQUENTIALLY, in order; the first non-zero
exit fails the command; and the command’s captured output is the
CONCATENATED stdout of every line in order. This is the one executor the
server’s declared-body dispatcher and the aion worker awl executor
share, so the ruling cannot be answered differently by venue.
Everything else is deliberately the same machinery as the string-body
executor: execve with no shell interposed, and the world of
super::world::place_in_declared_world — closed stdin, the host
environment cleared but for PATH, the document’s exports applied in
declared order over it — plus process-group containment and line-by-line
transcript streaming. Two executors that agreed about the argv and
disagreed about the world the process runs in would be two different
bodies wearing one declaration.
Structs§
- Declared
Command Action - A declared command, ready to run as an activity.
Functions§
- shape_
command_ result - Shape a successful command’s outcome into the action’s declared result.