I am using oh-my-zsh for my terminal. I have set IntelliJ to use /bin/zsh
as the shell path. However no environment variable in my .zshrc
file ever seems to get picked up. I'm defining environment variables like this (for instance):
export GOOGLE_APPLICATION_CREDENTIALS="$HOME/mailcreds.json"
But if I run:
echo $GOOGLE_APPLICATION_CREDENTIALS
Nothing comes up.
~/.profile
is the login shell script you would use for bash, the zsh equivalent login file is~/.zprofile
. That said, "Workaround 3" from that Jetbrains link seems more palatable to me because the/etc/zshrc
(for Mac) explicitly suggests overrides in .zshrc:zsh $ cat /etc/zshrc | grep override # Setup user specific overrides for this in ~/.zshrc. See zshbuiltins(1)
– Chaing