mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Merge pull request #12220 from DeterminateSystems/allow-dirty-locks
Add setting 'allow-dirty-locks'
This commit is contained in:
commit
c45dfeeef3
12 changed files with 67 additions and 17 deletions
|
@ -31,5 +31,14 @@ echo 456 > "$flake1Dir"/x.nix
|
|||
|
||||
[[ $(nix eval --json "$flake2Dir#x" --override-input flake1 "$TEST_ROOT/flake1") = 456 ]]
|
||||
|
||||
# Dirty overrides require --allow-dirty-locks.
|
||||
expectStderr 1 nix flake lock "$flake2Dir" --override-input flake1 "$TEST_ROOT/flake1" |
|
||||
grepQuiet "cannot write lock file.*because it has an unlocked input"
|
||||
grepQuiet "Will not write lock file.*because it has an unlocked input"
|
||||
|
||||
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"
|
||||
|
||||
[[ $(nix eval "$flake2Dir#x" --allow-dirty-locks) = 456 ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue