vintage_net v0.5.1 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()}
Run an arbitrary function
In general, try to avoid using this. VintageNet's unit test strategy is to verify configurations rather than verify the execution of the configurations. Functions can't be checked that they were created correctly.
Functions must return :ok
or {:error, reason}
.