fix(done): use ResolveBeadsDir for redirect file support

gt done was not following .beads/redirect files, causing it to fail
in worktrees where beads are redirected to a shared location.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mike Lady
2026-01-03 04:01:44 -08:00
parent 386dbf85fb
commit c3269ec841

View File

@@ -178,7 +178,7 @@ func runDone(cmd *cobra.Command, args []string) error {
}
// Initialize beads
bd := beads.New(cwd)
bd := beads.New(beads.ResolveBeadsDir(cwd))
// Determine target branch (auto-detect integration branch if applicable)
target := "main"
@@ -274,7 +274,7 @@ func runDone(cmd *cobra.Command, args []string) error {
fmt.Printf("%s\n", style.Dim.Render("Witness will dispatch new polecat when gate closes."))
// Register this polecat as a waiter on the gate
bd := beads.New(cwd)
bd := beads.New(beads.ResolveBeadsDir(cwd))
if err := bd.AddGateWaiter(doneGate, sender); err != nil {
style.PrintWarning("could not register as gate waiter: %v", err)
} else {