From 9f37ac92a7597fb6a0cdd06f9972ff6b86052d8d Mon Sep 17 00:00:00 2001 From: Henri Rosten Date: Thu, 2 Nov 2023 12:46:37 +0200 Subject: [PATCH] Add nix flake check to inv pre-push checks Signed-off-by: Henri Rosten --- tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks.py b/tasks.py index 1e62508c..8cdb5533 100644 --- a/tasks.py +++ b/tasks.py @@ -406,6 +406,11 @@ def pre_push(c: Any) -> None: LOG.info("Running nix fmt") cmd = f"nix fmt" ret = exec_cmd(cmd, raise_on_error=False) + if not ret: + sys.exit(1) + LOG.info("Running nix flake check") + cmd = f"nix flake check" + ret = exec_cmd(cmd, raise_on_error=False) if not ret: sys.exit(1) LOG.info("Building all nixosConfigurations")