parent
02a66b3fd7
commit
2ef7e2e795
1 changed files with 12 additions and 0 deletions
|
@ -18,6 +18,18 @@ if nix-store --verify --check-contents -v; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# The path can be repaired by rebuilding the derivation.
|
||||
nix-store --verify --check-contents --repair
|
||||
|
||||
nix-store --verify-path $path2
|
||||
|
||||
# Re-corrupt and delete the deriver. Now --verify --repair should
|
||||
# not work.
|
||||
chmod u+w $path2
|
||||
touch $path2/bad
|
||||
|
||||
nix-store --delete $(nix-store -qd $path2)
|
||||
|
||||
if nix-store --verify --check-contents --repair; then
|
||||
echo "nix-store --verify --repair succeeded unexpectedly" >&2
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue