diff --git a/direnvrc b/direnvrc index dc5c5cb..3e2973a 100644 --- a/direnvrc +++ b/direnvrc @@ -43,7 +43,7 @@ use_nix() { log_status using cached derivation fi local term_backup=$TERM path_backup=$PATH - if [[ -z ${TMPDIR+x} ]]; then + if [[ ! -z ${TMPDIR+x} ]]; then local tmp_backup=$TMPDIR fi @@ -51,7 +51,7 @@ use_nix() { read -r cache_content < "$cache" eval "$cache_content" export PATH=$PATH:$path_backup TERM=$term_backup TMPDIR=$tmp_backup - if [ -z ${tmp_backup+x} ]; then + if [ ! -z ${tmp_backup+x} ]; then export TMPDIR=${tmp_backup} else unset TMPDIR