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