Get shared process socket path to the environment service
This commit is contained in:
13
packages/vscode/src/fill/environmentService.ts
Normal file
13
packages/vscode/src/fill/environmentService.ts
Normal 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;
|
@ -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;
|
||||
|
@ -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> {
|
||||
|
Reference in New Issue
Block a user