mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-12-03 07:31:10 +01:00
Fix error with strict_env
With direnv’s `strict_env`, previously got an error > NIX_BUILD_TOP: unbound variable I tried to adjust the tests to catch this, but unfortunately I could not get it to fail.
This commit is contained in:
parent
02e11da5fb
commit
2011d81f03
1 changed files with 1 additions and 1 deletions
2
direnvrc
2
direnvrc
|
|
@ -100,7 +100,7 @@ _nix_import_env() {
|
||||||
# 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.
|
# Use recursive & force as it may not be empty.
|
||||||
if [[ "$NIX_BUILD_TOP" == */nix-shell.* && -d "$NIX_BUILD_TOP" ]]; then
|
if [[ -n "${NIX_BUILD_TOP+x}" && "$NIX_BUILD_TOP" == */nix-shell.* && -d "$NIX_BUILD_TOP" ]]; then
|
||||||
rm -rf "$NIX_BUILD_TOP"
|
rm -rf "$NIX_BUILD_TOP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue