(
projectPath: string,
workspacePath: string,
force: boolean,
noHooksEnv: GitExecOptions
)
| 865 | } |
| 866 | |
| 867 | private async removeGitWorktree( |
| 868 | projectPath: string, |
| 869 | workspacePath: string, |
| 870 | force: boolean, |
| 871 | noHooksEnv: GitExecOptions |
| 872 | ): Promise<void> { |
| 873 | const removeArgs = ["-C", projectPath, "worktree", "remove"]; |
| 874 | if (force) { |
| 875 | removeArgs.push("--force"); |
| 876 | } |
| 877 | removeArgs.push(workspacePath); |
| 878 | |
| 879 | using proc = execFileAsync("git", removeArgs, noHooksEnv); |
| 880 | await proc.result; |
| 881 | } |
| 882 | |
| 883 | private isMissingWorktreeError(message: string): boolean { |
| 884 | const normalizedError = message.toLowerCase(); |
no test coverage detected