Test that untrusted config is ignored without --accept-flake-config
This commit is contained in:
parent
0961c1068a
commit
79f27500a4
|
@ -25,5 +25,10 @@ cat <<EOF > flake.nix
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Without --accept-flake-config, the post hook should not run.
|
||||||
|
nix build < /dev/null
|
||||||
|
(! [[ -f post-hook-ran ]])
|
||||||
|
clearStore
|
||||||
|
|
||||||
nix build --accept-flake-config
|
nix build --accept-flake-config
|
||||||
test -f post-hook-ran || fail "The post hook should have ran"
|
test -f post-hook-ran || fail "The post hook should have ran"
|
||||||
|
|
Loading…
Reference in a new issue