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

Function isMissingWorktreeError

src/node/worktree/removeManagedGitWorktree.ts:8–11  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

6const MISSING_WORKTREE_ERROR_PATTERNS = ["not a working tree", "does not exist", "no such file"];
7
8function isMissingWorktreeError(message: string): boolean {
9 const normalizedError = message.toLowerCase();
10 return MISSING_WORKTREE_ERROR_PATTERNS.some((pattern) => normalizedError.includes(pattern));
11}
12
13async function worktreePathExists(worktreePath: string): Promise<boolean> {
14 try {

Callers 1

removeManagedGitWorktreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected