From c22289449db33211cbf489a5a73d0dd17de551ed Mon Sep 17 00:00:00 2001 From: Bryan Bennett Date: Wed, 29 Nov 2023 14:50:59 -0500 Subject: [PATCH] Rename tmp_profile to avoid cleanup as a gcroot --- direnvrc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/direnvrc b/direnvrc index ea975df..9c32c60 100644 --- a/direnvrc +++ b/direnvrc @@ -300,12 +300,11 @@ use_flake() { else local tmp_profile_rc - local tmp_profile="${layout_dir}/flake-profile.$$" + local tmp_profile="${layout_dir}/flake-tmp-profile.$$" if tmp_profile_rc=$(_nix print-dev-env --profile "$tmp_profile" "$@"); then _nix_clean_old_gcroots "$layout_dir" # We need to update our cache - echo "$tmp_profile_rc" > "$profile_rc" _nix_add_gcroot "$tmp_profile" "$profile" rm -f "$tmp_profile" "$tmp_profile"* @@ -446,7 +445,7 @@ use_nix() { if [[ $_nix_direnv_manual_reload -eq 1 && -z "${_nix_direnv_force_reload-}" ]]; then _nix_direnv_warn_manual_reload "$profile_rc" else - local tmp_profile="${layout_dir}/flake-profile.$$" + local tmp_profile="${layout_dir}/nix-tmp-profile.$$" local tmp_profile_rc if [[ -n "$packages" ]]; then extra_args+=("--expr" "with import {}; mkShell { buildInputs = [ $packages ]; }")