mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
parent
bca290c875
commit
a4d24b9052
1 changed files with 2 additions and 1 deletions
3
direnvrc
3
direnvrc
|
|
@ -99,8 +99,9 @@ _nix_import_env() {
|
||||||
# We cannot rely on this directory being availble at all times,
|
# We cannot rely on this directory being availble at all times,
|
||||||
# as it may be garbage collected.
|
# as it may be garbage collected.
|
||||||
# Instead - just remove it immediately.
|
# 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
|
if [[ "$NIX_BUILD_TOP" == */nix-shell.* && -d "$NIX_BUILD_TOP" ]]; then
|
||||||
rmdir "$NIX_BUILD_TOP"
|
rm -rf "$NIX_BUILD_TOP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_nix_export_or_unset NIX_BUILD_TOP "$old_nix_build_top"
|
_nix_export_or_unset NIX_BUILD_TOP "$old_nix_build_top"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue