Util.Exec behaviour (fnord v0.9.39)
View SourceSeam over subprocess execution for outward-facing commands that have no
dedicated facade of their own (git goes through GitCli; everything else
that shells out to affect the world outside the BEAM - desktop
notifications, escript installs - routes through this module). impl/0
resolves the :exec Globals key (same dispatch pattern as :http_client),
defaulting to the System passthrough in the sibling Default module. Tests
get the Mox mock with NO default stub, so a test that reaches an unscripted
subprocess fails loudly instead of spawning one.
Summary
Callbacks
Runs executable with args. Mirrors System.cmd/3: returns the
collected output and the exit status.
Resolves name on the PATH. Mirrors System.find_executable/1.
Callbacks
@callback cmd(String.t(), [String.t()], keyword()) :: {Collectable.t(), non_neg_integer()}
Runs executable with args. Mirrors System.cmd/3: returns the
collected output and the exit status.
Resolves name on the PATH. Mirrors System.find_executable/1.