function getExecOptions()

in robomaker-sample-app-ci/src/aws-robomaker-sample-application-ci.ts [46:63]


function getExecOptions(workingDir, extraPath, listenerBuffers?): ExecOptions {
  var listenerBuffers = listenerBuffers || {};
  const execOptions: ExecOptions = {
    cwd: path.join(workingDir, extraPath),
    env: Object.assign({}, process.env, ROS_ENV_VARIABLES)
  };
  if (listenerBuffers) {
    execOptions.listeners = {
      stdout: (data: Buffer) => {
        listenerBuffers.stdout += data.toString();
      },
      stderr: (data: Buffer) => {
        listenerBuffers.stderr += data.toString();
      }
    };
  }
  return execOptions
}