Create extension directory on startup

This commit is contained in:
Asher 2019-07-10 17:00:36 -05:00
parent 54ffd1d351
commit 09e3cfd881
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 13 additions and 0 deletions

View File

@ -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<string> {
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,