From e7a5361cd85959be0f366d3a53b8baabbeb5705f Mon Sep 17 00:00:00 2001 From: Percs <83934299+Percslol@users.noreply.github.com> Date: Fri, 19 Jul 2024 19:49:20 -0500 Subject: [PATCH] fix pre commit hook (part 2) --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 545a2ee..c854d08 100644 --- a/server.js +++ b/server.js @@ -73,7 +73,10 @@ fastify.listen({ host: "0.0.0.0", }); -writeFileSync(".git/hooks/pre-commit", "pnpm prettier . -w\ngit add -A"); +writeFileSync( + ".git/hooks/pre-commit", + "pnpm prettier . -w\ngit update-index --again" +); chmodSync(".git/hooks/pre-commit", 0o755); const watch = spawn("pnpm", ["rspack", "-w"], {