CauldronGPU.Setup.Command (CauldronGPU v0.3.3)

Copy Markdown View Source

Programs run by CauldronGPU.Setup's platforms.

output/2 runs a program and keeps what it printed. interactive/2 runs one on this terminal, so a password prompt (sudo) or an installer's questions reach the person running the setup.

Summary

Functions

Runs program with args on this terminal and waits for it: :ok, or {:error, text} when it is missing or exits with a failure.

What program with args printed, or :error when it is missing or failed.

Whether program with args runs and succeeds.

Functions

interactive(program, args)

@spec interactive(String.t(), [String.t()]) :: :ok | {:error, String.t()}

Runs program with args on this terminal and waits for it: :ok, or {:error, text} when it is missing or exits with a failure.

output(program, args)

@spec output(String.t(), [String.t()]) :: {:ok, String.t()} | :error

What program with args printed, or :error when it is missing or failed.

succeeds?(program, args)

@spec succeeds?(String.t(), [String.t()]) :: boolean()

Whether program with args runs and succeeds.