Skip to content

Comment on Ask HN: Why is Cursor IDE accessing all my env vars?parent

Comments

Seems like the correct answer to me. Let's assume henceforth in this post that the code still does what the original vs code authors claim it was intended to do, and nothing more. If you launch the IDE from a shell, or launch ANY program from that same shell, it will automatically have access to the environment that you're concerned about.

Here's where they introduced wrapping the environment output in "random" numbers:

https://github.com/microsoft/vscode/commit/1336b3d3c0d4338fb...

The associated issue explains that they needed to be able to ignore extraneous info returned by the shell itself, so they make the command return a token to delimit the actual environment info they want.

The very idea of spawning a shell to grab its environment has been there since the beginning of vs code:

https://github.com/microsoft/vscode/commit/8f35cc4768393b254...

iynOP

Thanks, I appreciate the additional context. Now all of it makes sense :)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.