Comparing version 0.2.0 to 0.3.0
@@ -13,3 +13,3 @@ (function() { | ||
module.exports = function(exe, options, callback) { | ||
var args, child, key, name, rcedit, stderr, value, _i, _j, _len, _len1, _ref; | ||
var args, child, error, key, name, rcedit, stderr, value, _i, _j, _len, _len1, _ref; | ||
rcedit = path.resolve(__dirname, '..', 'bin', 'rcedit.exe'); | ||
@@ -42,4 +42,5 @@ args = [exe]; | ||
stderr = ''; | ||
error = null; | ||
child.on('error', function(err) { | ||
return callback(err); | ||
return error != null ? error : error = err; | ||
}); | ||
@@ -50,3 +51,5 @@ child.stderr.on('data', function(data) { | ||
return child.on('close', function(code) { | ||
if (code === 0) { | ||
if (error != null) { | ||
return callback(error); | ||
} else if (code === 0) { | ||
return callback(null); | ||
@@ -53,0 +56,0 @@ } else { |
{ | ||
"name": "rcedit", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Node module to edit resources of exe", | ||
@@ -30,2 +30,1 @@ "main": "lib/rcedit.js", | ||
} | ||
@@ -16,2 +16,3 @@ # node-rcedit | ||
``` | ||
On platforms other then Windows you will need to have [Wine](http://winehq.org) installed and in the system path. | ||
@@ -18,0 +19,0 @@ ### rcedit(exePath, options, callback) |
57399
53
30