We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5f3172 commit da3abefCopy full SHA for da3abef
error-notifier.js
@@ -12,13 +12,9 @@ module.exports = (command, opts) => {
12
};
13
notifierOpts.sound = /mute/i.test(notifierOpts.sound) ? false : notifierOpts.sound;
14
15
- return execa.shell(command, {env: {FORCE_COLOR: true}})
16
- .then(result => {
17
- return Promise.resolve(result);
18
- })
19
- .catch(err => {
20
- notifier.notify(notifierOpts);
21
- return Promise.reject(err);
22
- });
23
-
+ return new Promise((resolve, reject) => {
+ execa.shell(command, {env: {FORCE_COLOR: true}})
+ .then(result => resolve(result))
+ .catch(err => notifier.notify(notifierOpts, () => reject(err)));
+ });
24
0 commit comments