-
Notifications
You must be signed in to change notification settings - Fork 39.7k
Set an explicit environment variable when resolving shell environment. #163186
Copy link
Copy link
Closed
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiderson-release-notesIssue/pull request mentioned in release notesIssue/pull request mentioned in release notesverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeededworkbench-os-integrationNative OS integration issuesNative OS integration issues
Milestone
Metadata
Metadata
Assignees
Labels
feature-requestRequest for new features or functionalityRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiderson-release-notesIssue/pull request mentioned in release notesIssue/pull request mentioned in release notesverification-neededVerification of issue is requestedVerification of issue is requestedverifiedVerification succeededVerification succeededworkbench-os-integrationNative OS integration issuesNative OS integration issues
For various reasons I do stuff in my
.bashrcthat breaks VS Code's shell environment resolution, which I'd rather not have to get rid of. As a workaround I'm only running that stuff if I don't detect eitherELECTRON_RUN_AS_NODEorELECTRON_NO_ATTACH_CONSOLE, which are both explicitly set for this resolution, but this is very brittle and I'm very uncomfortable relying on it.It would be great an environment variable like
VSCODE_RESOLVING_ENVIRONMENTcould be set for this process that users could explicitly rely on, this would also help users that run slow processes on shell startup (at least the ones that don't affect the environment, which is probably a niche case TBH).It should be a fairly simple change, just an extra line here to set the variable and an extra line here to unconditionally delete. It would also need to be documented somewhere as well, but I'm not quite sure where.
I'm happy to do the work, but I wanted to check first that this is actually a sensible change before submitting a pull request.