Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

cross-spawn-async deprecated #119

@cescoferraro

Description

@cescoferraro

Some users have been complaining about the npm install step

https://forum.ionicframework.com/t/ionic-freezes-on-installing-npm-packages/59406/3

I have looked under the hood and the code looks OK. It works on my machine.
But realized that 'cross-spawn-async' has been deprecated for this one
https://github.com/IndigoUnited/node-cross-spawn

Start.runSpawnCommand = function runSpawnCommand(cmd, args) {
  var q = Q.defer();
  var command = cmd + args.join(' ');
  var spawn = require('cross-spawn-async');

  log.debug('Running exec command:', command);

  var spawned = spawn(cmd, args);
  spawned.on('error', function(err) {
    Utils.fail('Unable to run spawn command' + err);
  });
  spawned.stdout.on('data', function(data) {
    log.debug(data.toString());
  });
  spawned.stderr.on('data', function(data) {
    log.debug(data.toString());
  });
  spawned.on('exit', function(code) {
    log.debug('Spawn command completed');
    if (code !== 0) {
      return q.reject('There was an error with the spawned command: ' + command);
    }
    return q.resolve();
  });

  return q.promise;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions