From e91db955b5c2c6b9f2d3f44f1fb86eda466113ea Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Mon, 8 Feb 2016 09:53:49 -0400 Subject: [PATCH] Show error dialogs on elevation errors Printing to `stderr` makes no sense since the process is detached from the shell when packaged. --- lib/elevate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/elevate.js b/lib/elevate.js index 72d1276f..017f9f7d 100644 --- a/lib/elevate.js +++ b/lib/elevate.js @@ -43,7 +43,7 @@ exports.require = function(app, callback) { name: 'Resin Etcher' }, function(error) { if (error) { - console.error(error.message); + electron.dialog.showErrorBox('Elevation Error', error.message); process.exit(1); } @@ -55,7 +55,7 @@ exports.require = function(app, callback) { elevator.execute(process.argv, {}, function(error) { if (error) { - console.error(error.message); + electron.dialog.showErrorBox('Elevation Error', error.message); process.exit(1); }