Table of Contents

Interface ICommandExecutor

Namespace
Ando.Execution
Assembly
ando.dll

Interface for executing CLI commands. Implementations include ProcessRunner (local) and ContainerExecutor (Docker). This abstraction enables ANDO to run the same build logic in different environments.

public interface ICommandExecutor

Methods

ExecuteAsync(string, string[], CommandOptions?)

Executes a command with real-time output streaming. Output is streamed to the logger as it's produced by the command.

Task<CommandResult> ExecuteAsync(string command, string[] args, CommandOptions? options = null)

Parameters

command string

The command to execute (e.g., "dotnet")

args string[]

Command arguments

options CommandOptions

Optional execution options

Returns

Task<CommandResult>

Result containing exit code and success status

IsAvailable(string)

Checks if a command/tool is available in the execution environment. Used to provide helpful error messages before attempting execution.

bool IsAvailable(string command)

Parameters

command string

Returns

bool