CommandExecutor
enum CommandExecutor
Types of supported command executors.
-
Not execute the command, only prints string:
Executed: <
to standard output. Returned> CommandRunResultcontains defined parameters with this enum.Declaration
Swift
case dummy(status: Int = 0, stdout: String = "", stderr: String = "")Parameters
statusThe command exit status.
stdoutThe command standard output.
stderrThe command error output.
-
Execute command and consume all outputs. This outputs can be later read from
CommandRunResult.stdoutandCommandRunResult.stderr. This executor is suitable for non-interactive, short running commands, likels,echoetc.Declaration
Swift
case `default` -
Execute command with redirected standard/error outputs to system standard outputs. This executor can handle user’s inputs from system standard input. The executor returns actual exit status of executed command but
stdoutandstderrofCommandRunResultwill be always empty strings.Declaration
Swift
case interactive
View on GitHub
CommandExecutor Enumeration Reference