CodexWrapper.Result (CodexWrapper v0.4.0)

Copy Markdown View Source

Result from a completed exec command.

Maps to the Rust CommandOutput -- the raw output from System.cmd.

Summary

Functions

Build a result from System.cmd/3 output.

Types

t()

@type t() :: %CodexWrapper.Result{
  exit_code: non_neg_integer(),
  stderr: String.t(),
  stdout: String.t(),
  success: boolean()
}

Functions

from_cmd(arg, opts \\ [])

@spec from_cmd({String.t(), non_neg_integer()}, keyword()) :: t()

Build a result from System.cmd/3 output.

System.cmd with :stderr_to_stdout merges stderr into stdout, so stderr is always "" in that case.