fix: fix direnv TMPDIR

This commit is contained in:
Felix Schröter 2020-01-23 13:18:11 +01:00 committed by Felix Schroeter
parent 1ca1091f5f
commit b795aef8b2
4 changed files with 84 additions and 33 deletions

View file

@ -23,13 +23,13 @@ use_nix() {
log_status using cached derivation
fi
local term_backup=$TERM path_backup=$PATH
if [ -n ${TMPDIR+x} ]; then
if ! [ -z ${TMPDIR+x} ]; then
local tmp_backup=$TMPDIR
fi
eval "$(< $cache)"
export PATH=$PATH:$path_backup TERM=$term_backup TMPDIR=$tmp_backup
if [ -n ${tmp_backup+x} ]; then
if ! [ -z ${tmp_backup+x} ]; then
export TMPDIR=${tmp_backup}
else
unset TMPDIR