Packages

Execution Plane process launch, stdio, PTY, and process-session runtime.

Current section

Files

Jump to
execution_plane_process lib execution_plane process transport run_result.ex
Raw

lib/execution_plane/process/transport/run_result.ex

defmodule ExecutionPlane.Process.Transport.RunResult do
@moduledoc """
Captured output and normalized exit data for one-shot non-PTY execution.
"""
alias ExecutionPlane.{Command, ProcessExit}
@enforce_keys [:invocation, :exit]
defstruct invocation: nil,
output: "",
stdout: "",
stderr: "",
exit: nil,
stderr_mode: :separate
@type stderr_mode :: :separate | :stdout
@type t :: %__MODULE__{
invocation: Command.t(),
output: binary(),
stdout: binary(),
stderr: binary(),
exit: ProcessExit.t(),
stderr_mode: stderr_mode()
}
@doc """
Returns `true` when the captured execution completed successfully.
"""
@spec success?(t()) :: boolean()
def success?(%__MODULE__{exit: %ProcessExit{} = exit}) do
ProcessExit.successful?(exit)
end
end