Commit d6303af4 by Dane Springmeyer

use exit even rather than close to support back to node v0.6.21 - closes #218

parent f2fd72cb
...@@ -99,9 +99,10 @@ function build(opts,callback) { ...@@ -99,9 +99,10 @@ function build(opts,callback) {
return callback(new Error("Failed to execute '" + shell_cmd + ' ' + shell_args.join(' ') + "' (" + err + ")")); return callback(new Error("Failed to execute '" + shell_cmd + ' ' + shell_args.join(' ') + "' (" + err + ")"));
} }
}); });
cmd.on('close', function (err, stdout, stderr) { // exit not close to support node v0.6.x
if (err) { cmd.on('exit', function (code) {
return callback(new Error("Failed to execute '" + shell_cmd + ' ' + shell_args.join(' ') + "' (" + err + ")")); if (code !== 0) {
return callback(new Error("Failed to execute '" + shell_cmd + ' ' + shell_args.join(' ') + "' (" + code + ")"));
} }
move(opts,callback); move(opts,callback);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment