build/index.js
function spawnCommand(command, args, options) {
  if (!command) throw new Error('Please specify a command to spawn.')
  const proc = /** @type {!_spawncommand.ChildProcessWithPromise} */ (spawn(command, args, options))

  const promise = getPromise(proc)
  proc.promise = promise
  /** @suppress {checkTypes} */
  proc.spawnCommand = proc['spawnargs'].join(' ')
  return proc
}
function spawnCommand(command, args, options) {
  if (!command) throw new Error('Please specify a command to spawn.')
  const proc = /** @type {!_spawncommand.ChildProcessWithPromise} */ (spawn(command, args, options))

  const promise = getPromise(proc)
  proc.promise = promise
  /** @suppress {checkTypes} */
  proc.spawnCommand = proc['spawnargs'].join(' ')
  return proc
}
function spawnCommand ( command , args , options ) { if ( ! command ) throw new Error ( 'Please specify a command to spawn.' ) const proc = /** @type {!_spawncommand.ChildProcessWithPromise} */ ( spawn ( command , args , options ) ) const promise = getPromise ( proc ) proc . promise = promise /** @suppress {checkTypes} */ proc . spawnCommand = proc [ 'spawnargs' ] . join ( ' ' ) return proc }
Spawns a new process using the `command` and returns an instance of a ChildProcess, extended to have a `promise` property which is resolved when the process exits. The resolved value is an object with `stdout`, `stderr` and `code` properties.
@param {string} command The command to run.
@param {!Array<string>} [args] List of string arguments.
@param {!child_process.SpawnOptions} [options] Options used to spawn.
Spawns a new process using the command and returns an instance of a ChildProcess extended to have a promise property which is resolved when the process exits . The resolved value is an object with stdout stderr and code properties .