Stevedore.CLI (Stevedore v0.1.0)

Copy Markdown View Source

Shared helpers for the mix stevedore.* task shells: starting the app, unwrapping verb results into task success/failure, and rendering errors consistently (reusing subsystem Exception.message/1).

The tasks themselves are thin — all behavior lives in the library.

Summary

Functions

Formats an error term into a one-line message.

Ensures the application and its dependencies are started (for the registry tasks).

Unwraps a verb result, raising a Mix.Error (non-zero exit) on failure with a formatted message.

Functions

format_error(error)

@spec format_error(term()) :: String.t()

Formats an error term into a one-line message.

start_app()

@spec start_app() :: :ok

Ensures the application and its dependencies are started (for the registry tasks).

unwrap!(arg1)

@spec unwrap!(:ok | {:ok, term()} | {:error, term()}) :: term()

Unwraps a verb result, raising a Mix.Error (non-zero exit) on failure with a formatted message.