summaryrefslogtreecommitdiff
path: root/plugins/dotenv/dotenv.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dotenv/dotenv.plugin.zsh')
-rw-r--r--plugins/dotenv/dotenv.plugin.zsh5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/dotenv/dotenv.plugin.zsh b/plugins/dotenv/dotenv.plugin.zsh
index 394455ae1..46cd4b10a 100644
--- a/plugins/dotenv/dotenv.plugin.zsh
+++ b/plugins/dotenv/dotenv.plugin.zsh
@@ -52,7 +52,10 @@ source_env() {
fi
# test .env syntax
- zsh -fn $ZSH_DOTENV_FILE || echo "dotenv: error when sourcing '$ZSH_DOTENV_FILE' file" >&2
+ zsh -fn $ZSH_DOTENV_FILE || {
+ echo "dotenv: error when sourcing '$ZSH_DOTENV_FILE' file" >&2
+ return 1
+ }
setopt localoptions allexport
source $ZSH_DOTENV_FILE