diff --git a/.zshrc b/.zshrc index cecb4f90..d1d0a95c 100644 --- a/.zshrc +++ b/.zshrc @@ -1,3 +1,10 @@ +# Source .env file early to export environment variables +if [ -f "$HOME/.env" ] ; then + set -a + source "$HOME/.env" + set +a +fi + if [ -d "$HOME/bin" ]; then export PATH="$HOME/bin:$PATH" fi @@ -39,13 +46,6 @@ if [ -d "$HOME/scripts" ]; then export PATH="$HOME/scripts:$PATH" fi -# Source .env file early to export environment variables -if [ -f "$HOME/.env" ] ; then - set -a - source "$HOME/.env" - set +a -fi - if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then