Archived
1
0

Get shared process socket path to the environment service

This commit is contained in:
Asher
2019-01-22 12:27:59 -06:00
committed by Kyle Carberry
parent 4eb9f87217
commit 36a2d26148
6 changed files with 51 additions and 35 deletions

View File

@ -0,0 +1,13 @@
import * as paths from "./paths";
import * as environment from "vs/platform/environment/node/environmentService";
export class EnvironmentService extends environment.EnvironmentService {
public get sharedIPCHandle(): string {
return paths._paths.socketPath || super.sharedIPCHandle;
}
}
// @ts-ignore
environment.EnvironmentService = EnvironmentService;

View File

@ -1,7 +1,8 @@
export const paths = {
export const _paths = {
appData: "/tmp",
defaultUserData: "/tmp",
socketPath: "/tmp/vscode-online.sock",
};
export let getAppDataPath = (): string => paths.appData;
export let getDefaultUserDataPath = (): string => paths.defaultUserData;
export const getAppDataPath = (): string => _paths.appData;
export const getDefaultUserDataPath = (): string => _paths.defaultUserData;

View File

@ -7,10 +7,7 @@ import { IWorkspaceIdentifier, IWorkspaceFolderCreationData, ISingleFolderWorksp
import { URI } from "vs/base/common/uri";
import { IRecentlyOpened } from "vs/platform/history/common/history";
import { ISerializableCommandAction } from "vs/platform/actions/common/actions";
// TODO: Might make sense to hook these straight in if we can.
// import { WindowsService as VSWindowsService } from "vs/platform/windows/electron-main/windowsService";
// import { WindowsManager } from "vs/code/electron-main/windows";
import { client } from "../client";
/**
* Instead of going to the shared process, we'll directly run these methods on
@ -199,9 +196,8 @@ class WindowsService implements IWindowsService {
}
// Shared process
public whenSharedProcessReady(): Promise<void> {
// TODO: Update once shared process is tied in.
return Promise.resolve();
public async whenSharedProcessReady(): Promise<void> {
await client.sharedProcessData;
}
public toggleSharedProcess(): Promise<void> {