Batamanta.Runner (batamanta v1.5.0)

Copy Markdown View Source

Abstracts system and Mix commands for easier testing.

Provides a behavior that allows mocking system commands during tests.

Summary

Functions

Finds an executable in the system PATH.

Runs a Mix task with the given arguments.

Executes a system command.

Functions

find_executable(cmd)

@spec find_executable(String.t()) :: String.t() | nil

Finds an executable in the system PATH.

mix_run(task, args)

@spec mix_run(String.t(), [String.t()]) :: any()

Runs a Mix task with the given arguments.

sys_cmd(cmd, args, opts \\ [])

@spec sys_cmd(String.t(), [String.t()], keyword()) :: {binary(), non_neg_integer()}

Executes a system command.