-
Notifications
You must be signed in to change notification settings - Fork 29k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
operating system independent home folder variable #141657
Comments
Can I work on this issue? |
Happy to test if needed. Another idea I had, if it is easier or makes more sense, is nested variables processed in order. For example, something like:
|
@Bruce-Hopkins you are welcome to work on it! First, let's make the first parameter of vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.ts Lines 124 to 125 in e7b3724
Then, you'll need to get the userhome value somewhere around here: vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.ts Lines 95 to 96 in e7b3724
For an example of how to get userhome (you won't need the preferLocal options): vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts Lines 246 to 249 in c8e2fd7
Finally, the variable name will need to be added into this switch: vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.ts Lines 224 to 225 in e7b3724
|
@alexr00 thanks! I appreciate the detailed response. If you could help, I have a few questions.
But in the constructor, we don't receive the vscode/src/vs/workbench/services/configurationResolver/common/variableResolver.ts Lines 43 to 44 in e7b3724
|
Once you make the first change ("First, let's make the first parameter of recursiveResolve here a new type which is IProcessEnvironement & {userHome: URI}."), you'll need to update the first parameter on that line.
Yep, an optional parameter is the way to get |
Is this good? I made the param a union type. Will this prevent needing to make any changes to the Also, I'm trying to find a way to use |
$HOME
.%userprofile%
.This means, if you need to reference something you have to specify it twice: once for Linux/macOS and once for Windows.
If VS Code had an environment variable (like https://code.visualstudio.com/docs/editor/variables-reference) that pointed to the running OS' home then it would simplify things in
tasks.json
.Pretty please? With sugar on top?
The text was updated successfully, but these errors were encountered: