Skip to content

platform/command

Documentation

Overview

Classes

Command

execute()

Executes a system command with specified configuration, environment variables, and exclusions.

ts
static execute(command: string, options: CommandOptions, add: EnvironmentVariables, remove: any): CommandOutput;
ParameterTypeDescription
commandstringThe command string to execute (e.g., "ls -l").
optionsCommandOptionsOptional configuration for the execution environment.
addEnvironmentVariablesOptional environment variables to add to the process.
removeanyOptional list of environment variable keys to remove from the process.

Returns

  • Type: CommandOutput
  • Description: A structured object containing the exit code and output streams.