How to use the processenv.default function in processenv

To help you get started, we’ve selected a few processenv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github thenativeweb / roboter / lib / shell / execLive.js View on Github external
const execLive = async function (command, options = {}) {
  if (!command) {
    throw new Error('Command is missing.');
  }

  const cwd = options.cwd || process.cwd(),
        env = options.env || processenv(),
        maxBuffer = options.maxBuffer || 1024 * 200;

  let args,
      binary;

  if (options.args) {
    binary = command;
    ({ args } = options);
  } else {
    [ binary, ...args ] = command.split(' ');
  }
  const childProcess = execa(binary, args, { cwd, env, maxBuffer });

  if (options.silent !== true) {
    childProcess.stdout.on('data', data => ui.passThrough(data));
    childProcess.stderr.on('data', data => ui.passThrough(data, { target: 'stderr' }));

processenv

processenv parses environment variables.

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis

Popular processenv functions