@ghl-ai/aw 0.1.36-beta.69 → 0.1.36-beta.70
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.
- package/git.mjs +5 -0
- package/package.json +1 -1
package/git.mjs
CHANGED
|
@@ -550,6 +550,11 @@ export function addProjectWorktree(awHome, projectDir) {
|
|
|
550
550
|
try { execSync(`rm -rf "${worktreeDir}"`, { stdio: 'pipe' }); } catch { /* best effort */ }
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
+
// Prune stale worktree metadata from ~/.aw/.git/worktrees/ before re-adding.
|
|
554
|
+
// Without this, `git worktree add` fails because the old metadata entry may still
|
|
555
|
+
// reference the deleted path, causing a "already exists" or similar error.
|
|
556
|
+
try { execSync(`git -C "${awHome}" worktree prune`, { stdio: 'pipe' }); } catch { /* best effort */ }
|
|
557
|
+
|
|
553
558
|
const slug = basename(projectDir)
|
|
554
559
|
.toLowerCase()
|
|
555
560
|
.replace(/[^a-z0-9]/g, '-')
|