(
projectPath: string,
branchMap: Record<string, string>
)
| 686 | } |
| 687 | |
| 688 | private async writeWorkspaceBranchMap( |
| 689 | projectPath: string, |
| 690 | branchMap: Record<string, string> |
| 691 | ): Promise<void> { |
| 692 | const branchMapPath = await this.getWorkspaceBranchMapPath(projectPath); |
| 693 | if (Object.keys(branchMap).length === 0) { |
| 694 | await fsPromises.rm(branchMapPath, { force: true }); |
| 695 | return; |
| 696 | } |
| 697 | await fsPromises.writeFile(branchMapPath, `${JSON.stringify(branchMap, null, 2)}\n`); |
| 698 | } |
| 699 | |
| 700 | private async getWorkspaceBranchMapPath(projectPath: string): Promise<string> { |
| 701 | const gitPath = path.join(projectPath, ".git"); |
no test coverage detected