Sign in Join
FPDoc Onlineexperiment

TBuildEngine.GetExecuteCommandOutput function

Member of TBuildEnginepublicIn unit fpMkUnit

Executes command and captures output text

Declaration

pascal
function GetExecuteCommandOutput(const Cmd: string; 
 const Args: TStrings; 
 Env: TStrings=Nil; 
 IgnoreError: Boolean=False): string
 ; virtual

Arguments

Cmd

Command executable to run

Args

Command line arguments list

Env

Environment variables for command execution

IgnoreError

Whether to ignore command execution errors

Function result

Command output as string

Description

Executes an external command and captures its standard output as a string. This is useful for retrieving information from external tools like version queries or configuration detection commands.

The command execution behavior follows the same pattern as ExecuteCommand but additionally captures and returns the output text.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.