mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
nix flake lock: Fail if there is an unlocked input
Since the only purpose of `nix flake lock` is to write a new lock file, it should be a fatal error if we can't write the lock file.
This commit is contained in:
parent
3081e7ce90
commit
8b9e0f86e4
4 changed files with 11 additions and 0 deletions
|
@ -30,3 +30,6 @@ git -C "$flake2Dir" add flake.nix
|
|||
echo 456 > "$flake1Dir"/x.nix
|
||||
|
||||
[[ $(nix eval --json "$flake2Dir#x" --override-input flake1 "$TEST_ROOT/flake1") = 456 ]]
|
||||
|
||||
expectStderr 1 nix flake lock "$flake2Dir" --override-input flake1 "$TEST_ROOT/flake1" |
|
||||
grepQuiet "cannot write lock file.*because it has an unlocked input"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue