Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/environment"

Index

Functions

BuildCommand

  • Build a new environment command object.

    Parameters

    • command: string

      The name of the command to execute.

    • Optional args: string[]

      An array of arguments to pass to the command.

    • Optional options: CommandOptions

      A CommandOptions structure containing options required when the command is executed.

    Returns Command

    A Command object which can be passed to the RunCommand method.

ExecuteCommand

  • ExecuteCommand(command: Command): Promise<__type>
  • Executes an environment command. The command will be executed via the child_process.spawn command. This ensures that a new process is used to run the command, thus ensuring no access to the local shell. The command will be attempted based on the value of the options.retry property in the passed Command object. Should no retries be specified, command execution will only be attempted once.

    throws

    An error containing a message from the failed command's stderr output.

    Parameters

    Returns Promise<__type>

    A Promise containing a string from stdout. If output from stderr occurred, this will be used instead.

Generated using TypeDoc