@@ -49,7 +49,7 @@ function getPipeName() {
49
49
return `${ PIPE_PATH_PREFIX } ${ PIPE_NAME } -${ uuid ( ) } ` ;
50
50
}
51
51
52
- WindowsToaster . prototype . notify = async function ( options , callback ) {
52
+ WindowsToaster . prototype . notify = function ( options , callback ) {
53
53
options = utils . clone ( options || { } ) ;
54
54
callback = callback || noop ;
55
55
var is64Bit = os . arch ( ) === 'x64' ;
@@ -122,22 +122,24 @@ WindowsToaster.prototype.notify = async function(options, callback) {
122
122
}
123
123
124
124
// Add pipeName option, to get the output
125
- resultBuffer = await utils . createNamedPipe ( namedPipe ) ;
126
- options . pipeName = namedPipe ;
127
-
128
- options = utils . mapToWin8 ( options ) ;
129
- var argsList = utils . constructArgumentList ( options , {
130
- explicitTrue : true ,
131
- wrapper : '' ,
132
- keepNewlines : true ,
133
- noEscape : true
125
+ utils . createNamedPipe ( namedPipe ) . then ( out => {
126
+ resultBuffer = out ;
127
+ options . pipeName = namedPipe ;
128
+
129
+ options = utils . mapToWin8 ( options ) ;
130
+ var argsList = utils . constructArgumentList ( options , {
131
+ explicitTrue : true ,
132
+ wrapper : '' ,
133
+ keepNewlines : true ,
134
+ noEscape : true
135
+ } ) ;
136
+
137
+ var notifierWithArch = notifier + '-x' + ( is64Bit ? '64' : '86' ) + '.exe' ;
138
+ utils . fileCommand (
139
+ this . options . customPath || notifierWithArch ,
140
+ argsList ,
141
+ actionJackedCallback
142
+ ) ;
134
143
} ) ;
135
-
136
- var notifierWithArch = notifier + '-x' + ( is64Bit ? '64' : '86' ) + '.exe' ;
137
- utils . fileCommand (
138
- this . options . customPath || notifierWithArch ,
139
- argsList ,
140
- actionJackedCallback
141
- ) ;
142
144
return this ;
143
145
} ;
0 commit comments