fix: remove unused channels in timeout message helpers

The timerChan and timeoutChan variables were created but never read from,
causing lint errors. Removed them since we don't need channel synchronization -
we only want the timeout to trigger a message, not block anything.
This commit is contained in:
matt wilkie
2025-12-21 12:13:39 -07:00
parent 03118e7226
commit 5a2976b500
2 changed files with 0 additions and 4 deletions

View File

@@ -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
}

View File

@@ -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
}