@@ -49,7 +49,7 @@ function getPipeName() {
4949 return `${ PIPE_PATH_PREFIX } ${ PIPE_NAME } -${ uuid ( ) } ` ;
5050}
5151
52- WindowsToaster . prototype . notify = async function ( options , callback ) {
52+ WindowsToaster . prototype . notify = function ( options , callback ) {
5353 options = utils . clone ( options || { } ) ;
5454 callback = callback || noop ;
5555 var is64Bit = os . arch ( ) === 'x64' ;
@@ -122,22 +122,24 @@ WindowsToaster.prototype.notify = async function(options, callback) {
122122 }
123123
124124 // 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+ ) ;
134143 } ) ;
135-
136- var notifierWithArch = notifier + '-x' + ( is64Bit ? '64' : '86' ) + '.exe' ;
137- utils . fileCommand (
138- this . options . customPath || notifierWithArch ,
139- argsList ,
140- actionJackedCallback
141- ) ;
142144 return this ;
143145} ;
0 commit comments