UNPKG

ember-intl

Version:

Ember toolbox for internationalization.

27 lines (22 loc) 647 B
/* jshint node: true */ 'use strict'; var RSVP = require('rsvp'); var spawn = require('child_process').spawn; function run (command, args, opts) { return new RSVP.Promise(function(resolve, reject) { var p = spawn(command, args, opts || {}); var stderr = ''; p.stderr.on('data', function(output) { stderr += output; }); p.on('close', function(code){ if (code !== 0) { console.log(stderr); reject(command + " exited with nonzero status"); } else { resolve(); } }); }); } module.exports = run;