mirror of
https://github.com/NixOS/nix
synced 2025-07-08 06:53:54 +02:00
Allow use of lock files with unlocked entries as long as they have a NAR hash
Fixes #12364.
This commit is contained in:
parent
5dec1dc086
commit
4113fdf2f0
2 changed files with 14 additions and 7 deletions
|
@ -37,8 +37,8 @@ expectStderr 1 nix flake lock "$flake2Dir" --override-input flake1 "$TEST_ROOT/f
|
|||
|
||||
nix flake lock "$flake2Dir" --override-input flake1 "$TEST_ROOT/flake1" --allow-dirty-locks
|
||||
|
||||
# Using a lock file with a dirty lock requires --allow-dirty-locks as well.
|
||||
expectStderr 1 nix eval "$flake2Dir#x" |
|
||||
grepQuiet "Lock file contains unlocked input"
|
||||
# Using a lock file with a dirty lock does not require --allow-dirty-locks, but should print a warning.
|
||||
expectStderr 0 nix eval "$flake2Dir#x" |
|
||||
grepQuiet "warning: Lock file entry .* is unlocked"
|
||||
|
||||
[[ $(nix eval "$flake2Dir#x" --allow-dirty-locks) = 456 ]]
|
||||
[[ $(nix eval "$flake2Dir#x") = 456 ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue