Add user home variable (#141902)

This commit is contained in:
Bruce Hopkins
2022-02-07 16:21:39 +01:00
committed by GitHub
parent 3381e7b20b
commit 1a17c0f2ef
6 changed files with 39 additions and 14 deletions

View File

@@ -5,6 +5,7 @@
import * as nls from 'vs/nls';
import type * as vscode from 'vscode';
import { homedir } from 'os';
import * as platform from 'vs/base/common/platform';
import { DebugAdapterExecutable, ThemeIcon } from 'vs/workbench/api/common/extHostTypes';
import { ExecutableDebugAdapter, SocketDebugAdapter, NamedPipeDebugAdapter } from 'vs/workbench/contrib/debug/node/debugAdapter';
@@ -155,7 +156,7 @@ export class ExtHostDebugService extends ExtHostDebugServiceBase {
}
protected createVariableResolver(folders: vscode.WorkspaceFolder[], editorService: ExtHostDocumentsAndEditors, configurationService: ExtHostConfigProvider): AbstractVariableResolverService {
return new ExtHostVariableResolverService(folders, editorService, configurationService, this._editorTabs, this._workspaceService);
return new ExtHostVariableResolverService(folders, editorService, configurationService, this._editorTabs, this._workspaceService, homedir());
}
}

View File

@@ -131,7 +131,7 @@ export class ExtHostTask extends ExtHostTaskBase {
private async getVariableResolver(workspaceFolders: vscode.WorkspaceFolder[]): Promise<ExtHostVariableResolverService> {
if (this._variableResolver === undefined) {
const configProvider = await this._configurationService.getConfigProvider();
this._variableResolver = new ExtHostVariableResolverService(workspaceFolders, this._editorService, configProvider, this.editorTabs, this.workspaceService);
this._variableResolver = new ExtHostVariableResolverService(workspaceFolders, this._editorService, configProvider, this.editorTabs, this.workspaceService, homedir());
}
return this._variableResolver;
}