fix broken eval a second time

This commit is contained in:
Jörg Thalheim 2019-10-23 14:09:01 +01:00
parent 9ce7643b1b
commit f988975869
No known key found for this signature in database
GPG key ID: B3F5D81B0C6967C4

View file

@ -35,8 +35,8 @@ use_nix() {
[[ -d .direnv ]] || mkdir .direnv
local dump_cmd tmp
dump_cmd="echo -n _____direnv_____; \"$direnv\" dump bash"
tmp=$(nix-shell --show-trace --pure "$@" \
--run "$dump_cmd" | grep -oP '(?<=_____direnv_____).*')
tmp=$(nix-shell --show-trace --pure "$@" --run "$dump_cmd" \
| grep -oP '(?<=_____direnv_____).*')
echo "$tmp" > "$cache"
update_drv=1
else
@ -48,7 +48,8 @@ use_nix() {
fi
log_status eval "$cache"
eval < "$cache"
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
export TMPDIR=${tmp_backup}