Class CommandOptions
Options for command execution. Mutable class to allow fluent configuration before execution.
public class CommandOptions
- Inheritance
-
CommandOptions
- Inherited Members
Fields
DefaultTimeoutMs
Default timeout for commands in milliseconds (5 minutes). Prevents commands from hanging indefinitely.
public const int DefaultTimeoutMs = 300000
Field Value
NoTimeout
No timeout value - use with caution as commands may hang indefinitely.
public const int NoTimeout = -1
Field Value
Properties
Environment
Environment variables to set for the command. Added to the process environment, not replacing it.
public Dictionary<string, string> Environment { get; }
Property Value
Interactive
Whether the command requires interactive input. When true, the process inherits the parent's console streams (stdin/stdout/stderr) instead of redirecting them. This allows child processes to prompt for user input. Output is not captured in this mode.
public bool Interactive { get; set; }
Property Value
SuppressOutput
Whether to suppress output from the command.
When true, stdout/stderr are captured but not streamed through the logger,
and debug logging of the command itself is skipped.
Useful for internal checks (e.g., docker info) where output is noise.
public bool SuppressOutput { get; set; }
Property Value
TimeoutMs
Timeout for the command in milliseconds. Defaults to DefaultTimeoutMs (5 minutes). Set to NoTimeout (-1) to disable timeout. Commands exceeding this timeout are forcefully terminated.
public int TimeoutMs { get; set; }
Property Value
WorkingDirectory
Working directory for the command. If null, uses the current working directory (or container default).
public string? WorkingDirectory { get; set; }