admin管理员组文章数量:1389951
I’m having an issue with VS Code in a react project. My environment variables from the terminal take precedence over the .env files.
I have multiple environments (production/debug), and my .env files are supposed to define the correct environment. However, even when I specify that the project should run in debug mode, it keeps using the environment variables set in the terminal (from printenv).
The problem is that for any reason the production env var are set in the workspace terminal and I cannot clear them because when I restart terminal the variables will be present again. And this has nothing to do with my project config, since even if I completely delete my env files from my project, when restarting my terminal the variables will be present again..
The only workaround I found is to delete the workspace and clone the project again using git clone, which is not ideal.
And these variables don't come from my deamon Mac terminal either, since they're not present there. It's only at the level of my vscode workspace, as if there were some sort of vscode configuration.
So if you have a solution, I'd love to hear it.
For more information I'm on Mac and I using dotenv to set my environment variable
本文标签: macosVSCode terminal env variable hardcoded can39t be removedStack Overflow
版权声明:本文标题:macos - VSCode terminal env variable hardcoded can't be removed - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744658418a2618095.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论