diff --git a/direnvrc b/direnvrc index 95de2e3..da82768 100644 --- a/direnvrc +++ b/direnvrc @@ -99,8 +99,9 @@ _nix_import_env() { # We cannot rely on this directory being availble at all times, # as it may be garbage collected. # Instead - just remove it immediately. + # Use recursive & force as it may not be empty. if [[ "$NIX_BUILD_TOP" == */nix-shell.* && -d "$NIX_BUILD_TOP" ]]; then - rmdir "$NIX_BUILD_TOP" + rm -rf "$NIX_BUILD_TOP" fi _nix_export_or_unset NIX_BUILD_TOP "$old_nix_build_top"