Skip to content

Set an explicit environment variable when resolving shell environment. #163186

@Sean1708

Description

@Sean1708

For various reasons I do stuff in my .bashrc that 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 either ELECTRON_RUN_AS_NODE or ELECTRON_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_ENVIRONMENT could 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.

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityhelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code Insiderson-release-notesIssue/pull request mentioned in release notesverification-neededVerification of issue is requestedverifiedVerification succeededworkbench-os-integrationNative OS integration issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions