dotenv: test and warn of incorrect.env syntax

Fixes #6337
master
Marc Cornellà 8 years ago
parent 9ecde7f732
commit c781d708da
  1. 3
      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

Loading…
Cancel
Save