Skip to content

Commit

Permalink
Fix both success and failure message being shown if installation fails
Browse files Browse the repository at this point in the history
References #460
  • Loading branch information
Gert-dev committed Sep 14, 2019
1 parent 5bfc51b commit 9e563b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/SerenataClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ class SerenataClient extends AutoLanguageClient
notification.dismiss();

const callback = async () => {
try {
await this.installServer();
} catch (e) {
if (!await this.installServer()) {
reject(new Error('Server installation failed'));
return;
}
Expand Down Expand Up @@ -148,6 +146,8 @@ class SerenataClient extends AutoLanguageClient
description: message,
dismissable: true,
});

return false;
}

atom.notifications.addSuccess('Serenata - Server Installation Succeeded', {dismissable: true});
Expand Down

0 comments on commit 9e563b1

Please sign in to comment.