vintage_net v0.6.2 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

Functions

Create a list of files

Remove a list of files

Run an arbitrary function

Link to this section Functions

Create a list of files

Remove a list of files

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}.