View Source VintageNet.Interface.CommandRunner (vintage_net v0.12.0)
The CommandRunner module runs commands specified in RawConfigs
See the RawConfig
documentation for where lists of commands
are specified. The following commands are supported:
{:run, command, args}
- Run a system command{:run_ignore_exit, command, args}
- Same as:run
, but without the exit status check{:fun, module, function_name, args}
- Run a function by MFA{:fun, fun}
- Run a function. Using the MFA form is preferred since it'seasier to verfiy in unit tests.
CommandRunner also implements RawConfig's file creation and cleanup logic.
Link to this section Summary
Link to this section Functions
@spec create_files([VintageNet.Interface.RawConfig.file_contents()]) :: :ok
Create a list of files
@spec remove_files([VintageNet.Interface.RawConfig.file_contents()]) :: :ok
Remove a list of files
@spec run( [VintageNet.Interface.RawConfig.command()] | VintageNet.Interface.RawConfig.command() ) :: :ok | {:error, any()}
Run one or more commands
See the module docs for documentation on commands.