@@ -154,7 +154,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
154
154
}
155
155
if ( cliPipe ) {
156
156
if ( parsedArgs [ 'openExternal' ] ) {
157
- openInBrowser ( parsedArgs [ '_' ] , verbose ) ;
157
+ await openInBrowser ( parsedArgs [ '_' ] , verbose ) ;
158
158
return ;
159
159
}
160
160
}
@@ -294,7 +294,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
294
294
}
295
295
} else {
296
296
if ( parsedArgs . status ) {
297
- sendToPipe ( {
297
+ await sendToPipe ( {
298
298
type : 'status'
299
299
} , verbose ) . then ( ( res : string ) => {
300
300
console . log ( res ) ;
@@ -305,7 +305,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
305
305
}
306
306
307
307
if ( parsedArgs [ 'install-extension' ] !== undefined || parsedArgs [ 'uninstall-extension' ] !== undefined || parsedArgs [ 'list-extensions' ] || parsedArgs [ 'update-extensions' ] ) {
308
- sendToPipe ( {
308
+ await sendToPipe ( {
309
309
type : 'extensionManagement' ,
310
310
list : parsedArgs [ 'list-extensions' ] ? { showVersions : parsedArgs [ 'show-versions' ] , category : parsedArgs [ 'category' ] } : undefined ,
311
311
install : asExtensionIdOrVSIX ( parsedArgs [ 'install-extension' ] ) ,
@@ -328,7 +328,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
328
328
waitMarkerFilePath = createWaitMarkerFileSync ( verbose ) ;
329
329
}
330
330
331
- sendToPipe ( {
331
+ await sendToPipe ( {
332
332
type : 'open' ,
333
333
fileURIs,
334
334
folderURIs,
@@ -345,7 +345,7 @@ export async function main(desc: ProductDescription, args: string[]): Promise<vo
345
345
} ) ;
346
346
347
347
if ( waitMarkerFilePath ) {
348
- waitForFileDeleted ( waitMarkerFilePath ) ;
348
+ await waitForFileDeleted ( waitMarkerFilePath ) ;
349
349
}
350
350
351
351
if ( readFromStdinPromise ) {
@@ -371,7 +371,7 @@ async function waitForFileDeleted(path: string) {
371
371
}
372
372
}
373
373
374
- function openInBrowser ( args : string [ ] , verbose : boolean ) {
374
+ async function openInBrowser ( args : string [ ] , verbose : boolean ) {
375
375
const uris : string [ ] = [ ] ;
376
376
for ( const location of args ) {
377
377
try {
@@ -385,7 +385,7 @@ function openInBrowser(args: string[], verbose: boolean) {
385
385
}
386
386
}
387
387
if ( uris . length ) {
388
- sendToPipe ( {
388
+ await sendToPipe ( {
389
389
type : 'openExternal' ,
390
390
uris
391
391
} , verbose ) . catch ( e => {
0 commit comments