Skip to content
Snippets Groups Projects
Commit 95700308 authored by jurgenhaas's avatar jurgenhaas
Browse files

#59 Add support for optional .env file in user home directory

parent 1ebf3708
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,9 @@ elif [[ -n ${SHELL} ]]; then ...@@ -46,6 +46,9 @@ elif [[ -n ${SHELL} ]]; then
else else
L3DSHELL="/usr/bin/fish" L3DSHELL="/usr/bin/fish"
fi fi
if [[ -f "${HOME}/.env" ]]; then
export $(cat ${HOME}/.env | xargs) > /dev/null 2>&1
fi
if [[ -f ".env" ]]; then if [[ -f ".env" ]]; then
export $(cat .env | xargs) > /dev/null 2>&1 export $(cat .env | xargs) > /dev/null 2>&1
fi fi
......
...@@ -9,6 +9,11 @@ function permissions { ...@@ -9,6 +9,11 @@ function permissions {
} }
function readEnv { function readEnv {
if [[ -f "${HOME}/.env" ]]; then
# shellcheck disable=SC2046
# shellcheck disable=SC2002
export $(cat ${HOME}/.env | xargs) > /dev/null 2>&1
fi
if [[ -f ".env" ]]; then if [[ -f ".env" ]]; then
# shellcheck disable=SC2046 # shellcheck disable=SC2046
# shellcheck disable=SC2002 # shellcheck disable=SC2002
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment