Skip to content

Commit

Permalink
direnv: dotenv compat
Browse files Browse the repository at this point in the history
I needed this for loading my local .env since it didn't seem to be
picking it up.

Signed-off-by: William Casarin <[email protected]>
  • Loading branch information
jb55 committed Feb 22, 2024
1 parent fa566dd commit 47475fc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
use nix

source .env || :
# dotenv compat
if [[ -f .env ]]; then
source .env

export DEEPL_KEY
while IFS='=' read -r key value; do
if [[ -n $key ]]; then
export "$key"
fi
done < .env
fi

0 comments on commit 47475fc

Please sign in to comment.