mirror of
https://github.com/microsoft/vscode.git
synced 2026-03-03 23:39:31 +00:00
fix hanging --wait processes
This commit is contained in:
@@ -14,6 +14,7 @@ import pkg from 'vs/platform/node/package';
|
||||
import * as fs from 'fs';
|
||||
import * as paths from 'path';
|
||||
import * as os from 'os';
|
||||
import { whenDeleted } from 'vs/base/node/pfs';
|
||||
|
||||
function shouldSpawnCliProcess(argv: ParsedArgs): boolean {
|
||||
return argv['list-extensions'] || !!argv['install-extension'] || !!argv['uninstall-extension'];
|
||||
@@ -105,14 +106,7 @@ export function main(argv: string[]): TPromise<void> {
|
||||
child.once('exit', () => c(null));
|
||||
|
||||
// Complete when wait marker file is deleted
|
||||
const interval = setInterval(() => {
|
||||
fs.exists(waitMarkerFilePath, exists => {
|
||||
if (!exists) {
|
||||
clearInterval(interval);
|
||||
c(null);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
whenDeleted(waitMarkerFilePath).done(c, c);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user