diff --git a/server.ts b/server.ts index 160ad0f9c..349d8e08f 100644 --- a/server.ts +++ b/server.ts @@ -11,6 +11,7 @@ import { getMediaMime } from "vs/base/common/mime"; import { extname } from "vs/base/common/path"; import { UriComponents, URI } from "vs/base/common/uri"; import { IPCServer, ClientConnectionEvent, StaticRouter } from "vs/base/parts/ipc/common/ipc"; +import { mkdirp } from "vs/base/node/pfs"; import { LogsDataCleaner } from "vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner"; import { IConfigurationService } from "vs/platform/configuration/common/configuration"; import { ConfigurationService } from "vs/platform/configuration/node/configurationService"; @@ -227,6 +228,18 @@ export class MainServer extends Server { }); } + public async listen(): Promise { + const environment = (this.services.get(IEnvironmentService) as EnvironmentService); + const mkdirs = Promise.all([ + environment.extensionsPath, + ].map((p) => mkdirp(p))); + const [address] = await Promise.all([ + super.listen(), + mkdirs, + ]); + return address; + } + protected async handleRequest( base: string, requestPath: string,