mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
fix broken eval a second time
This commit is contained in:
parent
9ce7643b1b
commit
f988975869
1 changed files with 4 additions and 3 deletions
7
direnvrc
7
direnvrc
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue