Fix client not using log dir from shared proc

Needed the path set promise to run first.

And removed the protocol promise stuff that was hanging around not doing
anything useful.
This commit is contained in:
Asher 2019-01-30 13:13:04 -06:00 committed by Kyle Carberry
parent a0c443d8d3
commit 8654f9cb06
No known key found for this signature in database
GPG Key ID: A0409BDB6B0B3EDB
1 changed files with 10 additions and 23 deletions

View File

@ -15,36 +15,23 @@ import { toLocalISOString } from "vs/base/common/date";
// import { RawContextKey, IContextKeyService } from "vs/platform/contextkey/common/contextkey";
import { URI } from "vs/base/common/uri";
import { Protocol } from "vs/base/parts/ipc/node/ipc.net";
export class Client extends IDEClient {
private readonly windowId = parseInt(toLocalISOString(new Date()).replace(/[-:.TZ]/g, ""), 10);
public readonly protocolPromise: Promise<Protocol>;
public protoResolve: ((protocol: Protocol) => void) | undefined;
private readonly pathSets: Promise<void>;
public constructor() {
super();
this.protocolPromise = new Promise((resolve): void => {
this.protoResolve = resolve;
});
this.pathSets = this.sharedProcessData.then((data) => {
paths._paths.socketPath = data.socketPath;
process.env.VSCODE_LOGS = data.logPath;
});
this.initData.then((data) => {
paths._paths.appData = data.dataDirectory;
paths._paths.defaultUserData = data.dataDirectory;
process.env.SHELL = data.shell;
});
}
protected initialize(): Promise<void> {
registerContextMenuListener();
const pathSets = this.sharedProcessData.then((data) => {
paths._paths.socketPath = data.socketPath;
process.env.VSCODE_LOGS = data.logPath;
});
return this.task("Start workbench", 1000, async (data) => {
paths._paths.appData = data.dataDirectory;
paths._paths.defaultUserData = data.dataDirectory;
process.env.SHELL = data.shell;
const { startup } = require("./startup");
await startup({
machineId: "1",
@ -96,7 +83,7 @@ export class Client extends IDEClient {
// bounded.set(enabled);
// });
this.clipboard.initialize();
}, this.initData, this.pathSets);
}, this.initData, pathSets);
}
protected createUriFactory(): IURIFactory {