From c767762ee0666e4b5a36e1587e691db050d1c07c Mon Sep 17 00:00:00 2001 From: 0xee Date: Thu, 12 Dec 2019 15:29:56 +0100 Subject: [PATCH] Always recreate recipe by evaluating .envrc evaluating .envrc (not the cached section) should not be expensive --- direnv-cache | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/direnv-cache b/direnv-cache index 5cb6bee..17370ce 100755 --- a/direnv-cache +++ b/direnv-cache @@ -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 + echo "Re-creating recipe" + direnv exec . true > /dev/null source "${cacheFile}.recipe" dumpEnv > "${cacheFile}.post" diffEnvs "${cacheFile}.pre" "${cacheFile}.post" > "$cacheFile"