diff options
author | Marc Cornellà <marc.cornella@live.com> | 2018-08-08 00:05:34 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-08-08 00:05:34 +0200 |
commit | c781d708da064b42af19e20113d042b65e886d94 (patch) | |
tree | 8aa265ba85a205dbb9e2a975d36fa3554d6098c6 /plugins/dotenv | |
parent | 9ecde7f73211607353954b6fd76fef56d7e663b3 (diff) | |
download | zsh-c781d708da064b42af19e20113d042b65e886d94.tar.gz zsh-c781d708da064b42af19e20113d042b65e886d94.tar.bz2 zsh-c781d708da064b42af19e20113d042b65e886d94.zip |
dotenv: test and warn of incorrect.env syntax
Fixes #6337
Diffstat (limited to 'plugins/dotenv')
-rw-r--r-- | plugins/dotenv/dotenv.plugin.zsh | 3 |
1 files changed, 3 insertions, 0 deletions
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 |