Compare commits
2 Commits
20b2dfac7c
...
c767762ee0
Author | SHA1 | Date |
---|---|---|
0xee | c767762ee0 | |
0xee | ba07678b31 |
|
@ -84,15 +84,15 @@ case $cmd in
|
||||||
if [[ -n $DIRENV_DIR ]]; then
|
if [[ -n $DIRENV_DIR ]]; then
|
||||||
# run self in clean environment (i.e. outside of the current direnv
|
# run self in clean environment (i.e. outside of the current direnv
|
||||||
# environment)
|
# environment)
|
||||||
|
echo "Switching to clean environment"
|
||||||
exec direnv exec /proc "${BASH_SOURCE[0]}" "$@"
|
exec direnv exec /proc "${BASH_SOURCE[0]}" "$@"
|
||||||
fi
|
fi
|
||||||
echo "Re-creating cache"
|
echo "Re-creating cache"
|
||||||
mkdir -p "$(dirname ${cacheFile})"
|
mkdir -p "$(dirname ${cacheFile})"
|
||||||
dumpEnv > "${cacheFile}.pre"
|
dumpEnv > "${cacheFile}.pre"
|
||||||
source <(direnv stdlib)
|
source <(direnv stdlib)
|
||||||
if [[ .envrc -nt ${cacheFile}.recipe ]]; then
|
echo "Re-creating recipe"
|
||||||
direnv exec . true > /dev/null
|
direnv exec . true > /dev/null
|
||||||
fi
|
|
||||||
source "${cacheFile}.recipe"
|
source "${cacheFile}.recipe"
|
||||||
dumpEnv > "${cacheFile}.post"
|
dumpEnv > "${cacheFile}.post"
|
||||||
diffEnvs "${cacheFile}.pre" "${cacheFile}.post" > "$cacheFile"
|
diffEnvs "${cacheFile}.pre" "${cacheFile}.post" > "$cacheFile"
|
||||||
|
|
Loading…
Reference in New Issue