ExQuality.OutputCollector (ExQuality v0.5.0)

View Source

Collects command output without streaming to console.

Implements the Collectable protocol for use with System.cmd/3's :into option. Stores all output in memory for later retrieval.

Example

collector = ExQuality.OutputCollector.new()
{_output, _exit_code} = System.cmd("mix", ["compile"], into: collector)
output = ExQuality.OutputCollector.get_output(collector)

Summary

Functions

Retrieves the collected output as a binary string.

Creates a new output collector.

Types

t()

@type t() :: %ExQuality.OutputCollector{pid: pid()}

Functions

get_output(output_collector)

@spec get_output(t()) :: String.t()

Retrieves the collected output as a binary string.

new()

@spec new() :: t()

Creates a new output collector.