From 32db4ff35be3055ceaab3f8312ed8cb035ca6878 Mon Sep 17 00:00:00 2001 From: Joonas Rautiola Date: Tue, 19 Dec 2023 12:43:54 +0200 Subject: [PATCH] Don't format files in the pre-push check Signed-off-by: Joonas Rautiola --- tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 364a420a..9f30b90e 100644 --- a/tasks.py +++ b/tasks.py @@ -495,9 +495,10 @@ def pre_push(c: Any) -> None: if not ret: LOG.warning("Run `terraform fmt -recursive` locally to fix formatting") sys.exit(1) - cmd = "nix fmt" + cmd = "alejandra --check ." ret = exec_cmd(cmd, raise_on_error=False) if not ret: + LOG.warning("Run `nix fmt` locally to fix formatting") sys.exit(1) cmd = "nix flake check -v" ret = exec_cmd(cmd, raise_on_error=False)