mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
only set default values for nix-path
if nothing else is set
TODO: this doesn't work yet.
we currently have no way of checking if a config value was set or not.
this is the expected behavior for default values:
new values should override them, not prepend.
the change fixes a logic bug introduced when fixing the previously confused
override mechanism in e062021314
.
This commit is contained in:
parent
4c7a6ffee7
commit
4a920b46da
3 changed files with 8 additions and 1 deletions
|
@ -42,6 +42,12 @@ done
|
|||
# finding something that's not in any of the default paths fails
|
||||
( ! $(nix-instantiate --find-file test) )
|
||||
|
||||
# setting anything overrides the default paths
|
||||
# this ensures we can force an empty search path
|
||||
[[ $(NIX_PATH= nix-instantiate --eval -E 'with builtins; length nixPath') = 0 ]]
|
||||
[[ $(nix-instantiate --nix-path "" --eval -E 'with builtins; length nixPath') = 0 ]]
|
||||
[[ $(nix-instantiate -I "" --eval -E 'with builtins; length nixPath') = 1 ]]
|
||||
|
||||
echo "nix-path = test=$TEST_ROOT/from-nix-path-file" >> "$test_nix_conf"
|
||||
|
||||
# Use nix.conf in absence of NIX_PATH
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue