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

@@ -941,7 +941,12 @@ export class ExtHostDebugConsole {
export class ExtHostVariableResolverService extends AbstractVariableResolverService {
constructor(folders: vscode.WorkspaceFolder[], editorService: ExtHostDocumentsAndEditors | undefined, configurationService: ExtHostConfigProvider, editorTabs: IExtHostEditorTabs, workspaceService?: IExtHostWorkspace) {
constructor(folders: vscode.WorkspaceFolder[],
editorService: ExtHostDocumentsAndEditors | undefined,
configurationService: ExtHostConfigProvider,
editorTabs: IExtHostEditorTabs,
workspaceService?: IExtHostWorkspace,
userHome?: string) {
function getActiveUri(): URI | undefined {
if (editorService) {
const activeEditor = editorService.activeEditor();
@@ -1019,7 +1024,7 @@ export class ExtHostVariableResolverService extends AbstractVariableResolverServ
}
return undefined;
}
}, undefined, Promise.resolve(process.env));
}, undefined, userHome ? Promise.resolve(userHome) : undefined, Promise.resolve(process.env));
}
}