fix: update .envrc to use prop env path

This commit is contained in:
Alejandro Baez 2022-07-31 23:26:05 -05:00 committed by Mayel de Borniol
parent 30cb04ccb7
commit 28a5c208b5

8
.envrc
View file

@ -3,11 +3,17 @@ watch_file deps.nix
watch_file props.nix
function env_file_watch {
config_file="config/${MIX_ENV:-dev}/public.env"
config_file_path="config/${MIX_ENV:-dev}"
config_file="${config_file_path}/.env"
if [[ -f ${config_file} ]]; then
watch_file ${config_file}
dotenv ${config_file}
fi
secrets_file="${config_file_path}/secrets.env"
if [[ -f ${secrets_file} ]]; then
watch_file ${secrets_file}
dotenv ${secrets_file}
fi
}
env_file_watch