From ab5d10faaab33b9bd043037089cf034ac4beabfb Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Tue, 21 Jun 2022 12:29:09 +0300 Subject: [PATCH] direnv cleanup. Use the stdlib better. --- .config/git/skel/.envrc | 7 +++++-- Repositories/SchooLinks/.envrc | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.config/git/skel/.envrc b/.config/git/skel/.envrc index aba4524..bf920b0 100644 --- a/.config/git/skel/.envrc +++ b/.config/git/skel/.envrc @@ -1,4 +1,7 @@ # shellcheck shell=bash disable=SC1091 # vim: ft=sh -source_up || true -[ ! -f .envrc.private ] || . .envrc.private +if ( cd .. && find_up .envrc >/dev/null ) +then + source_up || true +fi +source_env_if_exists .envrc.private diff --git a/Repositories/SchooLinks/.envrc b/Repositories/SchooLinks/.envrc index 3def1a8..0e20cd4 100644 --- a/Repositories/SchooLinks/.envrc +++ b/Repositories/SchooLinks/.envrc @@ -1,10 +1,13 @@ # shellcheck shell=bash disable=SC1091 # vim: ft=sh -source_up || true +if ( cd .. && find_up .envrc >/dev/null ) +then + source_up || true +fi export AWS_DEFAULT_PROFILE=schoolinks export AWS_PROFILE=schoolinks export COMPOSE_FILE='docker-compose.local.yml' export GIT_AUTHOR_EMAIL='nimrod@schoolinks.com' export GIT_AUTHOR_NAME='Nimrod Adar' export PIPENV_VENV_IN_PROJECT=1 -[ ! -f .envrc.private ] || . .envrc.private +source_env_if_exists .envrc.private -- GitLab