Skip to main content

Module exec

Module exec 

Source
Expand description

Exec runtime: build argv from a parsed pipeline and execute it as a chain of child processes. No shell is ever invoked.

The pipeline AST itself is produced by crate::parse::exec; this module is concerned only with executing it safely.

Semantics:

  • A ValueRef is resolved against an ExecContext (query/path/header/ var maps and a BodyValue).
  • A Text token is always emitted as one argv element. Missing interpolations render as the empty string.
  • A [..] Group token is emitted only if every required interpolation resolves; otherwise the whole group is omitted from argv (this is how optional flags work).
  • Pipeline stages are wired stdin → stdout. A bare Source stage ($ | cmd) feeds a value as stdin to the next command.

Structs§

ExecContext
ExecOutput

Enums§

BodyValue

Functions§

build_argv
preview_pipeline
Render a human-readable, non-executing preview of pipeline against ctx. Used by --dry-run to log the commands that would have run.
run_pipeline