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

Function writeFakeGitCloneShim

src/node/services/projectService.test.ts:56–70  ·  view source on GitHub ↗
(fakeGitPath: string)

Source from the content-addressed store, hash-verified

54}
55
56async function writeFakeGitCloneShim(fakeGitPath: string): Promise<void> {
57 await fs.writeFile(
58 fakeGitPath,
59 `#!/bin/sh
60printf '%s\n' "$@" > "$FAKE_GIT_ARGS_LOG"
61if [ "$1" = "clone" ]; then
62 mkdir -p "$5/.git"
63 exit 0
64fi
65exit 1
66`,
67 "utf-8"
68 );
69 await fs.chmod(fakeGitPath, 0o755);
70}
71
72async function cloneWithFakeGit(
73 tempDir: string,

Callers 1

cloneWithFakeGitFunction · 0.85

Calls 1

writeFileMethod · 0.65

Tested by

no test coverage detected