diff --git a/lib/shared/permissions.js b/lib/shared/permissions.js index a9cce645..adb54374 100644 --- a/lib/shared/permissions.js +++ b/lib/shared/permissions.js @@ -198,6 +198,13 @@ exports.elevateCommand = (command, options) => { // for now, we should make sure we double check if the error messages // have changed every time we upgrade `sudo-prompt`. + }).catch((error) => { + return _.includes(error.message, 'is not in the sudoers file'); + }, () => { + throw errors.createUserError({ + title: 'Your user doesn\'t have enough privileges to proceed', + description: 'This application requires sudo privileges to be able to write to drives' + }); }).catch({ message: 'User did not grant permission.' }, () => {