Compare commits

...

2 Commits

Author SHA1 Message Date
0xee 20b2dfac7c Always recreate recipe by evaluating .envrc
evaluating .envrc (not the cached section) should not be expensive
2019-12-12 15:30:30 +01:00
Lukas Schuller da4b0586e5 Add some logging 2019-12-09 14:40:17 +01:00
1 changed files with 3 additions and 3 deletions

View File

@ -84,15 +84,15 @@ case $cmd in
if [[ -n $DIRENV_DIR ]]; then
# run self in clean environment (i.e. outside of the current direnv
# environment)
echo "Switching to clean environment"
exec direnv exec /proc "${BASH_SOURCE[0]}" "$@"
fi
echo "Re-creating cache"
mkdir -p "$(dirname ${cacheFile})"
dumpEnv > "${cacheFile}.pre"
source <(direnv stdlib)
if [[ .envrc -nt ${cacheFile}.recipe ]]; then
direnv exec . true > /dev/null
fi
echo "Re-creating recipe"
direnv exec . true > /dev/null
source "${cacheFile}.recipe"
dumpEnv > "${cacheFile}.post"
diffEnvs "${cacheFile}.pre" "${cacheFile}.post" > "$cacheFile"