Skip to content

Commit

Permalink
Return the full Adobe error if there is no code match.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron423698 committed Nov 14, 2015
1 parent 01a8bf0 commit 543817e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion app/src/installer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var platform = require("os").platform;
var install_process = require("child_process");
var path = require('path');
var errors = (new global.Messages()).errors

global.installer = function() {

Expand Down Expand Up @@ -34,7 +35,8 @@ global.installer = function() {
spawn.stdout.on('data',function(data){
console.log('stdout: ' + data.toString());
var logbits = /-(\d+)/.exec(data.toString());
reject(logbits && logbits[1] ? parseInt(logbits[1]) : null);
var code = logbits && logbits[1] ? parseInt(logbits[1]) : null;
reject(errors.get(code) || 'Error: ' + data.toString());
});

spawn.stderr.on('data',function(data){
Expand Down
5 changes: 2 additions & 3 deletions app/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ global.View = function() {
toggleSpinner(true);
}

var installationFailed = function(error) {

var installationFailed = function(err) {
toggleSpinner(false);
updateStatus(msg.errors.get(error) || 'Error: ' + error);
updateStatus(err);
}

var installationSuccess = function() {
Expand Down

0 comments on commit 543817e

Please sign in to comment.