(logPath: string)
| 704 | } |
| 705 | |
| 706 | async function readLoggedEnv(logPath: string): Promise<Record<string, string>> { |
| 707 | const envContent = await fs.readFile(logPath, "utf-8"); |
| 708 | return Object.fromEntries( |
| 709 | envContent |
| 710 | .split("\n") |
| 711 | .map((line) => line.trim()) |
| 712 | .filter((line) => line.includes("=")) |
| 713 | .map((line) => { |
| 714 | const separatorIndex = line.indexOf("="); |
| 715 | return [line.slice(0, separatorIndex), line.slice(separatorIndex + 1)] as const; |
| 716 | }) |
| 717 | ); |
| 718 | } |
| 719 | |
| 720 | async function writeFakeGitCloneEnvLoggingShim( |
| 721 | fakeGitPath: string, |
no test coverage detected