diff --git a/plugins/dotenv/dotenv.plugin.zsh b/plugins/dotenv/dotenv.plugin.zsh index a0c2d0051..b701b5596 100644 --- a/plugins/dotenv/dotenv.plugin.zsh +++ b/plugins/dotenv/dotenv.plugin.zsh @@ -1,5 +1,8 @@ source_env() { if [[ -f .env ]]; then + # test .env syntax + zsh -fn .env || echo 'dotenv: error when sourcing `.env` file' >&2 + if [[ -o a ]]; then source .env else