vintage_net v0.2.1 VintageNet.Interface.CommandRunner

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

Link to this function

create_files(file_contents)

Create a list of files

Link to this function

remove_files(file_contents)

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