From 79f27500a45f9b1eda3d54114cf835f73775af8e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 18 Nov 2021 13:32:52 +0100 Subject: [PATCH] Test that untrusted config is ignored without --accept-flake-config --- tests/flake-local-settings.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/flake-local-settings.sh b/tests/flake-local-settings.sh index 6ee6b17d6..09f6b4ca8 100644 --- a/tests/flake-local-settings.sh +++ b/tests/flake-local-settings.sh @@ -25,5 +25,10 @@ cat < flake.nix } 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 test -f post-hook-ran || fail "The post hook should have ran"