提交 50bef59c 编写于 作者: A apwelsh 提交者: GitHub

Update environmentService.ts to enable ENV defined extenstions-dir

This update allows VS Code users to define the desired extensions directory by means of an environment variable "vscode_config_ext", instead of having to rely on the command-line arguments.  By providing a path to the extensions directory in an environment variable, VS Code is able to have a system or user defined extensions directory that does not require a wrapper script to launch code for the settings to take effect.  This solution is similar to the npm ENV variable solution "npm_config_cache".

This is 1/2 of the solution for providing a portable solution to remove VS Code from the Windows roaming profile.
上级 e0a8ca57
......@@ -90,7 +90,7 @@ export class EnvironmentService implements IEnvironmentService {
get backupWorkspacesPath(): string { return path.join(this.backupHome, 'workspaces.json'); }
@memoize
get extensionsPath(): string { return parsePathArg(this._args['extensions-dir'], process) || path.join(this.userHome, product.dataFolderName, 'extensions'); }
get extensionsPath(): string { return parsePathArg(this._args['extensions-dir'], process) || process.env['vscode_config_ext'] || path.join(this.userHome, product.dataFolderName, 'extensions'); }
@memoize
get extensionDevelopmentPath(): string { return this._args.extensionDevelopmentPath ? path.normalize(this._args.extensionDevelopmentPath) : this._args.extensionDevelopmentPath; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册