1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-21 07:20:09 +00:00

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() {
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