Options
All
  • Public
  • Public/Protected
  • All
Menu

A collection of utilities related to executing a sub-process.

export

Hierarchy

  • ExecUtils

Index

Methods

Static spawnAndGetOutput

  • spawnAndGetOutput(command: string, args?: string[], options?: SpawnSyncOptions): Buffer | string
  • Spawn a process with arguments and throw an error if the process fails. Parameters are same as child_process.spawnSync (see Node.js docs). Use this method if you want the safe argument parsing of spawnSync combined with the smart output handling of execSync.

    Parameters

    • command: string
    • Optional args: string[]
    • Optional options: SpawnSyncOptions

    Returns Buffer | string

    Contents of stdout as buffer or string

Generated using TypeDoc