mirror of
https://github.com/coder/code-server.git
synced 2026-05-17 01:29:09 -05:00
* Allow setting paths for builtin exts and extra dirs The extra directories aren't used yet, just available from the environment service and to the shared process. * Utilize extra builtin extensions path * Utilize extra extensions directory * Fix cached mtimes for extra extension dirs * Simplify extension cache equality check
31 lines
859 B
TypeScript
31 lines
859 B
TypeScript
import * as paths from "./paths";
|
|
import * as environment from "vs/platform/environment/node/environmentService";
|
|
|
|
/**
|
|
* Customize paths using data received from the initialization message.
|
|
*/
|
|
export class EnvironmentService extends environment.EnvironmentService {
|
|
public get sharedIPCHandle(): string {
|
|
return paths.getSocketPath() || super.sharedIPCHandle;
|
|
}
|
|
|
|
public get extensionsPath(): string {
|
|
return paths.getExtensionsDirectory();
|
|
}
|
|
|
|
public get builtinExtensionsPath(): string {
|
|
return paths.getBuiltInExtensionsDirectory();
|
|
}
|
|
|
|
public get extraExtensionPaths(): string[] {
|
|
return paths.getExtraExtensionDirectories();
|
|
}
|
|
|
|
public get extraBuiltinExtensionPaths(): string[] {
|
|
return paths.getExtraBuiltinExtensionDirectories();
|
|
}
|
|
}
|
|
|
|
const target = environment as typeof environment;
|
|
target.EnvironmentService = EnvironmentService;
|