safe_os (rebar_safe v1.0.1)

View Source

Port-based process execution — no shell, ever — args list only.

Use shell_passthrough/3 to run a binary directly with an explicit args list. Output is forwarded to standard_io as it arrives; only the exit code is returned.

Summary

Functions

Execute an executable directly with an explicit args list (no shell involved).

Types

exit_code/0

-type exit_code() :: non_neg_integer().

shell_option/0

-type shell_option() :: {cd, file:filename_all()} | {env, [{string(), string() | false}]}.

shell_options/0

-type shell_options() :: [shell_option()].

Functions

shell_passthrough(Executable, Args, Options)

-spec shell_passthrough(Executable :: file:filename_all(),
                        Args :: [string()],
                        Options :: shell_options()) ->
                           exit_code().

Execute an executable directly with an explicit args list (no shell involved).