mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
.git/hooks/ doesn't exist when it's a submodule, which would crash the server.
This commit is contained in:
parent
9879199d27
commit
18f85c7860
1 changed files with 2 additions and 1 deletions
|
@ -13,7 +13,7 @@ import { baremuxPath } from "@mercuryworkshop/bare-mux/node";
|
|||
import { epoxyPath } from "@mercuryworkshop/epoxy-transport";
|
||||
import { libcurlPath } from "@mercuryworkshop/libcurl-transport";
|
||||
import { bareModulePath } from "@mercuryworkshop/bare-as-module3";
|
||||
import { chmodSync, writeFileSync } from "fs";
|
||||
import { chmodSync, mkdirSync, writeFileSync } from "fs";
|
||||
|
||||
const bare = createBareServer("/bare/", {
|
||||
logErrors: true,
|
||||
|
@ -86,6 +86,7 @@ fastify.listen({
|
|||
});
|
||||
console.log(`Listening on port ${PORT}`);
|
||||
|
||||
mkdirSync(".git/hooks", { recursive: true });
|
||||
writeFileSync(
|
||||
".git/hooks/pre-commit",
|
||||
"pnpm prettier . -w\ngit update-index --again"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue