dotenv: test and warn of incorrect.env syntax

Fixes #6337
This commit is contained in:
Marc Cornellà 2018-08-08 00:05:34 +02:00
parent 9ecde7f732
commit c781d708da

View File

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