I am not able to source my .zshrc file when I open VSCode by clicking on the icon. This causes my pytest discovery to fail because it is looking for an environment variable that is not loaded (but is included in my .zshrc).
I have this in my VSCode settings:
"terminal.integrated.defaultProfile.osx": "zsh", # I am using a Mac
I've tried both
"terminal.integrated.inheritEnv": false,
and
"terminal.integrated.inheritEnv": true,
However, if I open a terminal and type code .
, then it will load VSCode with my environment variables and all will work as expected. Is there a way to get the same behavior when I load it from clicking the icon? Is there some setting that I'm missing?
EDIT:
My environment variables are actually in ~/.profile
, which is sourced by .zshrc
, so I'm happy if it reads either .profile
or .zshrc
.