FFix.Runner.Result (ffix v0.2.0)

Copy Markdown View Source

The outcome and captured output of an execution.

FFix.run/2 returns this value on success. On failure, it is available as the result field of FFix.Runner.Error. Streaming includes it in the exit event.

  • exit_status — zero for success; a non-zero status for failure.
  • stdout, stderr — captured bytes according to FFix.Runner.run/2 options; nil when discarded.
  • last_progress — latest parsed progress update, when available.
  • argv, shell — the executed arguments and their shell-quoted representation.
  • command — original command data, or nil for raw argv.
  • started_at, finished_at, duration_ms — execution timing.

Full stderr collection retains all diagnostic output in memory; use a bounded tail for long-running commands. Stderr is preserved as raw bytes, not parsed logs.

Summary

Types

exit_status()

@type exit_status() :: non_neg_integer()

t()

@type t() :: %FFix.Runner.Result{
  argv: [String.t()],
  command: FFix.Command.t() | nil,
  duration_ms: non_neg_integer() | nil,
  exit_status: exit_status() | nil,
  finished_at: DateTime.t() | nil,
  last_progress: FFix.Runner.Progress.t() | nil,
  shell: String.t(),
  started_at: DateTime.t() | nil,
  stderr: binary() | nil,
  stdout: binary() | nil
}