Skip to content

Commit 1c9d956

Browse files
authored
Merge pull request #342 from JeroenOnstuimig/patch-1
Fix named pipe in WSL
2 parents 3006e5a + 8c0355c commit 1c9d956

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

notifiers/toaster.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ var fallback;
1515

1616
const PIPE_NAME = 'notifierPipe';
1717
const PIPE_PATH_PREFIX = '\\\\.\\pipe\\';
18+
const PIPE_PATH_PREFIX_WSL = '/tmp/';
1819

1920
module.exports = WindowsToaster;
2021

@@ -46,7 +47,8 @@ function parseResult(data) {
4647
}
4748

4849
function getPipeName() {
49-
return `${PIPE_PATH_PREFIX}${PIPE_NAME}-${uuid()}`;
50+
var pathPrefix = utils.isWSL() ? PIPE_PATH_PREFIX_WSL : PIPE_PATH_PREFIX;
51+
return `${pathPrefix}${PIPE_NAME}-${uuid()}`;
5052
}
5153

5254
function notifyRaw(options, callback) {

0 commit comments

Comments
 (0)