e2e/shared/common.js
function exec(cmd, args, opts) {
  console.log(`Running command: ${cmd} ${args.join(' ')}`);
  const cp = childProcessSpawn(cmd, args, opts);

  cp.stdout.on('data', data => log(data));
  cp.stderr.on('data', data => log(data));

  return new Promise((resolve, reject) => {
    cp.on('error', err => reject(log(err)));
    cp.on('exit', code => resolve(code));
  });
}
function exec(cmd, args, opts) {
  console.log(`Running command: ${cmd} ${args.join(' ')}`);
  const cp = childProcessSpawn(cmd, args, opts);

  cp.stdout.on('data', data => log(data));
  cp.stderr.on('data', data => log(data));

  return new Promise((resolve, reject) => {
    cp.on('error', err => reject(log(err)));
    cp.on('exit', code => resolve(code));
  });
}
function exec ( cmd , args , opts ) { console . log ( ` ${ cmd } ${ args . join ( ' ' ) } ` ) ; const cp = childProcessSpawn ( cmd , args , opts ) ; cp . stdout . on ( 'data' , data => log ( data ) ) ; cp . stderr . on ( 'data' , data => log ( data ) ) ; return new Promise ( ( resolve , reject ) => { cp . on ( 'error' , err => reject ( log ( err ) ) ) ; cp . on ( 'exit' , code => resolve ( code ) ) ; } ) ; }
Spawns a child_process and returns a promise.
@name exec
Spawns a child_process and returns a promise .