From 9e9363d9d3093d8cb5e56719399ee3abd9b642ed Mon Sep 17 00:00:00 2001 From: "Brandon Waterloo [MSFT]" <36966225+bwateratmsft@users.noreply.github.com> Date: Thu, 3 Mar 2022 14:39:47 -0500 Subject: [PATCH] Support `userHome` variable --- src/utils/resolveVariables.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/resolveVariables.ts b/src/utils/resolveVariables.ts index cac2943d0c..2134a56bd7 100644 --- a/src/utils/resolveVariables.ts +++ b/src/utils/resolveVariables.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See LICENSE.md in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as os from 'os'; import * as path from 'path'; import { WorkspaceFolder, window, workspace } from 'vscode'; import { cloneObject } from '../utils/cloneObject'; @@ -41,6 +42,8 @@ function resolveSingleVariable(variable: string, folder?: WorkspaceFolder, addit case '${workspaceFolder}': case '${workspaceRoot}': return path.normalize(folder.uri.fsPath); + case '${userHome}': + return os.homedir(); case '${relativeFile}': return path.relative(path.normalize(folder.uri.fsPath), getActiveFilePath()); default: