docs: function buildSpawn (cmd, args, opts, callback) {
    var proc = spawn(cmd, args, opts)
    var buffer = new Buffer('')
    var cmdError = {}
  
    cmd = cmd + ' ' + args.join(' ')
  
    if (proc.stdout) {
      proc.stdout.on('data', function indexOnData (data) {
        buffer = Buffer.concat([buffer, data])
      })
    }
  
    proc
      .on('error', function spawnOnError (err) {
        cmdError = new CommandError({
          command: cmd,
          message: err.message ? err.message : undefined,
          stack: err.stack ? err.stack : undefined,
          buffer: buffer ? buffer : undefined,
          status: err.status ? err.status : 1
        })
      })
      .on('close', function spawnOnClose (code) {
        if (code === 0) {
          callback(null, buffer.toString().trim(), code, buffer)
          return
        }
  
        cmdError = new CommandError({
          command: cmd,
          message: cmdError.message ? cmdError.message : undefined,
          stack: cmdError.stack ? cmdError.stack : undefined,
          buffer: cmdError.buffer ? cmdError.buffer : buffer,
          status: cmdError.status ? cmdError.status : code
        })
        callback(cmdError, undefined, code, undefined)
      })
  
    return proc
  }