-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add a WT_SETTINGS_DIR env variable that portable profiles can use #16949
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it. I've also got a couple thoughts...
If we want to include the root path for WT, can it be WT_ROOT
instead?
Alternatively... should it actually be a path to the settings root? That would let an entire settings folder -- whether it is in LocalAppData, the Package storage, or in a portable install -- roam independent of its EXE path. I ask mainly because the package root is immutable and useless to most people (for example).
This is a better idea. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still wondering if it should be WT_SETTINGS_ROOT (or DIR) since it doesn’t point at the json file itself! Also make sure you update your PR title/body!
I believe |
// Do this here, rather than at the top of main. This will prevent us from | ||
// including this variable in the vars we serialize in the | ||
// Remoting::CommandlineArgs up in HandleCommandlineArgs. | ||
_setupFolderPathEnvVar(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW an alternative, but more robust approach may be to have our own ExpandEnvironmentStringsW
. It would also work better together with virtual env vars and the like. We already have such a function in a way in til::env
already too.
…6949) Basically, title. It'd be a neat idea for portable installs of the Terminal to reference files that are right there in the portable install. This PR adds a `WT_SETTINGS_DIR` var to Terminal's own env block. This allows us to resolve profiles relative to our own settings folder. Closes #16295 (cherry picked from commit 36c81f2) Service-Card-Id: 92352620 Service-Version: 1.20
Basically, title.
It'd be a neat idea for portable installs of the Terminal to reference files that are right there in the portable install.
This PR adds a
WT_SETTINGS_DIR
var to Terminal's own env block. This allows us to resolve profiles relative to our own settings folder.Closes #16295