Bash.CommandResult (Bash v0.3.0)

Copy Markdown View Source

Represents the result of executing a command.

Output is streamed through sinks during execution rather than accumulated here. Use OutputCollector to capture output when needed for testing.

Fields

  • command - The command string that was executed
  • exit_code - The exit code (0 for success, non-zero for failure)
  • error - Error type if command failed (:command_not_found, :timeout, etc.)

Summary

Types

error_type()

@type error_type() :: :command_not_found | :command_failed | :timeout | term()

t()

@type t() :: %Bash.CommandResult{
  command: String.t(),
  error: error_type() | nil,
  exit_code: non_neg_integer() | nil
}