lib/commands.js
function run (command, opts, conf) {
  // Use "new Promise" to isolate process and catch any error
  return new Promise(function (resolve, reject) {
    if (command.config) {
      opts = command.config(opts, conf);
    }

    Promise.cast(command.run(opts.argv, opts, conf)).then(resolve, reject);
  });
}
function run (command, opts, conf) {
  // Use "new Promise" to isolate process and catch any error
  return new Promise(function (resolve, reject) {
    if (command.config) {
      opts = command.config(opts, conf);
    }

    Promise.cast(command.run(opts.argv, opts, conf)).then(resolve, reject);
  });
}
function run ( command , opts , conf ) { // Use "new Promise" to isolate process and catch any error return new Promise ( function ( resolve , reject ) { if ( command . config ) { opts = command . config ( opts , conf ) ; } Promise . cast ( command . run ( opts . argv , opts , conf ) ) . then ( resolve , reject ) ; } ) ; }
Safe-fun command
Safe - fun command