Skip to content

Commit 080d5a0

Browse files
authored
code --wait --merge never exits (fix microsoft#249601) (microsoft#250328)
1 parent ad80711 commit 080d5a0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vs/workbench/services/host/browser/browserHostService.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,13 @@ export class BrowserHostService extends Disposable implements IHostService {
389389
(async () => {
390390

391391
// Wait for the resources to be closed in the text editor...
392-
await this.instantiationService.invokeFunction(accessor => whenEditorClosed(accessor, fileOpenables.map(fileOpenable => fileOpenable.fileUri)));
392+
const filesToWaitFor: URI[] = [];
393+
if (options.mergeMode) {
394+
filesToWaitFor.push(fileOpenables[3].fileUri /* [3] is the resulting merge file */);
395+
} else {
396+
filesToWaitFor.push(...fileOpenables.map(fileOpenable => fileOpenable.fileUri));
397+
}
398+
await this.instantiationService.invokeFunction(accessor => whenEditorClosed(accessor, filesToWaitFor));
393399

394400
// ...before deleting the wait marker file
395401
await this.fileService.del(waitMarkerFileURI);

0 commit comments

Comments
 (0)