Class ProcessRunner
Executes commands on the host machine as child processes with real-time output streaming. Used for Docker CLI commands that must run on the host to manage containers.
public class ProcessRunner : CommandExecutorBase, ICommandExecutor
- Inheritance
-
ProcessRunner
- Implements
- Inherited Members
Constructors
ProcessRunner(IBuildLogger)
Executes commands on the host machine as child processes with real-time output streaming. Used for Docker CLI commands that must run on the host to manage containers.
public ProcessRunner(IBuildLogger logger)
Parameters
loggerIBuildLogger
Methods
IsAvailable(string)
Checks if a command is available by running it with --version. Most CLI tools support --version and exit with code 0.
public override bool IsAvailable(string command)
Parameters
commandstring
Returns
PrepareProcessStartInfo(string, string[], CommandOptions)
Prepares the ProcessStartInfo for command execution. Subclasses override this to customize the command setup (e.g., wrapping in docker exec).
protected override ProcessStartInfo PrepareProcessStartInfo(string command, string[] args, CommandOptions options)
Parameters
commandstringargsstring[]optionsCommandOptions