diff options
Diffstat (limited to 'lib/utils/spawn.js')
-rw-r--r-- | lib/utils/spawn.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/utils/spawn.js b/lib/utils/spawn.js index 74684521f..e389d83e0 100644 --- a/lib/utils/spawn.js +++ b/lib/utils/spawn.js @@ -1,16 +1,16 @@ module.exports = spawn -var _spawn = require("child_process").spawn -var EventEmitter = require("events").EventEmitter +var _spawn = require('child_process').spawn +var EventEmitter = require('events').EventEmitter function spawn (cmd, args, options) { var raw = _spawn(cmd, args, options) var cooked = new EventEmitter() - raw.on("error", function (er) { + raw.on('error', function (er) { er.file = cmd - cooked.emit("error", er) - }).on("close", function (code, signal) { + cooked.emit('error', er) + }).on('close', function (code, signal) { // Create ENOENT error because Node.js v0.8 will not emit // an `error` event if the command could not be found. if (code === 127) { @@ -21,7 +21,7 @@ function spawn (cmd, args, options) { er.file = cmd cooked.emit('error', er) } else { - cooked.emit("close", code, signal) + cooked.emit('close', code, signal) } }) |