MCPcopy
hub / github.com/coder/mux / createInitHook

Function createInitHook

tests/ipc/workspace/create.test.ts:102–107  ·  view source on GitHub ↗

* Create init hook file in git repo

(repoPath: string, hookContent: string)

Source from the content-addressed store, hash-verified

100 * Create init hook file in git repo
101 */
102async function createInitHook(repoPath: string, hookContent: string): Promise<void> {
103 const muxDir = path.join(repoPath, MUX_DIR);
104 await fs.mkdir(muxDir, { recursive: true });
105 const initHookPath = path.join(muxDir, INIT_HOOK_FILENAME);
106 await fs.writeFile(initHookPath, hookContent, { mode: 0o755 });
107}
108
109/**
110 * Commit changes in git repo

Callers 1

create.test.tsFile · 0.85

Calls 1

writeFileMethod · 0.65

Tested by

no test coverage detected