Always recreate recipe by evaluating .envrc

evaluating .envrc (not the cached section) should not be expensive
0xee 2019-12-12 15:29:56 +01:00
parent da4b0586e5
commit 20b2dfac7c
1 changed files with 2 additions and 4 deletions

View File

@ -91,10 +91,8 @@ case $cmd in
mkdir -p "$(dirname ${cacheFile})"
dumpEnv > "${cacheFile}.pre"
source <(direnv stdlib)
if [[ .envrc -nt ${cacheFile}.recipe ]]; then
echo "Re-creating recipe"
direnv exec . true > /dev/null
fi
source "${cacheFile}.recipe"
dumpEnv > "${cacheFile}.post"
diffEnvs "${cacheFile}.pre" "${cacheFile}.post" > "$cacheFile"