diff --git a/cmd/bd/sync.go b/cmd/bd/sync.go index 7d72ec2a..5e31ea19 100644 --- a/cmd/bd/sync.go +++ b/cmd/bd/sync.go @@ -2157,12 +2157,10 @@ func checkOrphanedChildrenInJSONL(jsonlPath string) (*OrphanedChildren, error) { // This helps when git operations hang waiting for credential/browser auth. func runGitCmdWithTimeoutMsg(ctx context.Context, cmd *exec.Cmd, cmdName string, timeoutDelay time.Duration) ([]byte, error) { // Start a timer to print a message if the command takes too long - timeoutChan := make(chan struct{}, 1) go func() { select { case <-time.After(timeoutDelay): fmt.Fprintf(os.Stderr, "⏳ %s is taking longer than expected (possibly waiting for authentication). If this hangs, check for a browser auth prompt or run 'git status' in another terminal.\n", cmdName) - timeoutChan <- struct{}{} case <-ctx.Done(): // Context cancelled, don't print message } diff --git a/internal/syncbranch/worktree.go b/internal/syncbranch/worktree.go index 455c5193..2979e2b8 100644 --- a/internal/syncbranch/worktree.go +++ b/internal/syncbranch/worktree.go @@ -786,12 +786,10 @@ func fetchAndRebaseInWorktree(ctx context.Context, worktreePath, branch, remote // Returns: combined output and error from the command func runCmdWithTimeoutMessage(ctx context.Context, timeoutMsg string, timeoutDelay time.Duration, cmd *exec.Cmd) ([]byte, error) { // Start a timer to print a message if the command takes too long - timerChan := make(chan struct{}, 1) go func() { select { case <-time.After(timeoutDelay): fmt.Fprintf(os.Stderr, "⏳ %s\n", timeoutMsg) - timerChan <- struct{}{} case <-ctx.Done(): // Context cancelled, don't print message }