@fractary/faber-cli 1.3.13 → 1.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -312,7 +312,12 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
|
|
|
312
312
|
}
|
|
313
313
|
catch (error) {
|
|
314
314
|
// If worktree already exists, try to use it
|
|
315
|
-
|
|
315
|
+
// Check for both "already exists" and exit code 128 which indicates the path exists
|
|
316
|
+
if (error instanceof Error &&
|
|
317
|
+
(error.message.includes('already exists') ||
|
|
318
|
+
error.message.includes('exit code 128') ||
|
|
319
|
+
error.message.includes(`'${worktree}'`) ||
|
|
320
|
+
error.message.includes(worktree.replace('~', (await import('os')).homedir())))) {
|
|
316
321
|
if (outputFormat === 'text') {
|
|
317
322
|
console.log(chalk.yellow(` ⚠️ Worktree already exists, using existing worktree`));
|
|
318
323
|
}
|