From 7ec4cfb172b9105dbbd3d250d37beab20fbee75b Mon Sep 17 00:00:00 2001 From: Bryan Bennett Date: Fri, 22 Dec 2023 08:32:07 -0500 Subject: [PATCH] Get environment restoration working --- direnvrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/direnvrc b/direnvrc index 0d72aaf..c498f73 100644 --- a/direnvrc +++ b/direnvrc @@ -39,7 +39,11 @@ use_flake_env() { local old_xdg_data_dirs=${XDG_DATA_DIRS:-} local ld=$(direnv_layout_dir) - eval $(@flake_env@ "$1" "$ld") + export direnv + + eval "$(@flake_env@ "$1" "$ld")" + + export -n direnv # `nix print-dev-env` will create a temporary directory and use it as TMPDIR # We cannot rely on this directory being available at all times,