7cb5fa8aea3d325fee08e3c1708abd12cdea1c1c
- Author
- Arthur <192247+arteezy@users.noreply.github.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/dotenv/README.md b/plugins/dotenv/README.md
2index ade09fbb20d4dbada9a9363c70666ce507bdd39e..e0e75571f581dc0555b133ddc7aacf6c6f86e977 100644
3--- a/plugins/dotenv/README.md
4+++ b/plugins/dotenv/README.md
5@@ -2,19 +2,19 @@
6
7 Automatically load your project ENV variables from `.env` file when you `cd` into project root directory.
8
9diff --git a/plugins/dotenv/dotenv.plugin.zsh b/plugins/dotenv/dotenv.plugin.zsh
10index 9dd7842293c4a28b4a8d06a012a0204bf325b660..fa47c4c6833f2f9db3492e609f9ece46db75ebf8 100644
11--- a/plugins/dotenv/dotenv.plugin.zsh
12+++ b/plugins/dotenv/dotenv.plugin.zsh
13@@ -2,7 +2,13 @@
14
15 source_env() {
16 if [[ -f .env ]]; then
17- source .env
18+ if [[ -o a ]]; then
19+ source .env
20+ else
21+ set -a
22+ source .env
23+ set +a
24+ fi
25 fi
26 }
27