Table of Contents

Method ExecuteTerminalCommand

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

ExecuteTerminalCommand(string, string?, bool, bool)

Executes terminal command redirecting output and error streams to Log(object?, LogItemKind).

public static (string? Output, string? Error, int ExitCode) ExecuteTerminalCommand(string command, string? folder = null, bool waitResult = false, bool logStdOut = true)

Parameters

command string

Terminal command.

folder string

Value of WorkingDirectory.

waitResult bool

Whether to wait until command finishes its execution.

logStdOut bool

Specifies whether to hook and log stdout and stderr.

Returns

(string Output, string Error, int ExitCode)

Result of the command execution in case when waitResult is true; otherwise null.