🐛 Fix potential null reference callback invokation

Fixes #11328
This commit is contained in:
Thomas Johansen 2016-03-31 13:24:14 +02:00
parent dea5c5560e
commit 22acdb76f6

View File

@ -17,7 +17,7 @@ exports.safeExec = function(command, options, callback) {
var child = childProcess.exec(command, options, function(error, stdout, stderr) {
if (error)
process.exit(error.code || 1);
else
else if (callback)
callback(null);
});
child.stderr.pipe(process.stderr);