Skip to content

Commit da3abef

Browse files
0x04mischah
authored andcommitted
fix: fix windows compatibility
Closes #1 Thanks @0x04
1 parent e5f3172 commit da3abef

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

error-notifier.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,9 @@ module.exports = (command, opts) => {
1212
};
1313
notifierOpts.sound = /mute/i.test(notifierOpts.sound) ? false : notifierOpts.sound;
1414

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-
15+
return new Promise((resolve, reject) => {
16+
execa.shell(command, {env: {FORCE_COLOR: true}})
17+
.then(result => resolve(result))
18+
.catch(err => notifier.notify(notifierOpts, () => reject(err)));
19+
});
2420
};

0 commit comments

Comments
 (0)