vintage_net v0.7.3 VintageNet.Interface.CommandRunner View Source
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, fun}
- Run an function
CommandRunner also implements RawConfig's file creation and cleanup logic.
Link to this section Summary
Link to this section Functions
Link to this function
create_files(file_contents)
View Sourcecreate_files([VintageNet.Interface.RawConfig.file_contents()]) :: :ok
Create a list of files
Link to this function
remove_files(file_contents)
View Sourceremove_files([VintageNet.Interface.RawConfig.file_contents()]) :: :ok
Remove a list of files
Link to this function
run(arg1)
View Sourcerun( [VintageNet.Interface.RawConfig.command()] | VintageNet.Interface.RawConfig.command() ) :: :ok | {:error, any()}
Call a function
In general, prefer the module, function_name, args
form since it's easier to
check in unit tests.
Functions must return :ok
or {:error, reason}
.