Skip to content

Conversation

@anujc25
Copy link
Contributor

@anujc25 anujc25 commented Jan 7, 2026

Description of the Change

This PR updates the go-interact library from a legacy version (2017) to v1.0.2 (2025) and adjusts keyboard interrupt handling throughout the codebase to align with the updated library's behavior.

Key changes:

  • Upgraded github.com/vito/go-interact from v0.0.0-20171111012221-fa338ed9e9ec to v1.0.2
  • Updated isInterrupt() function in util/ui/prompt.go to detect keyboard interrupts using io.EOF instead of the legacy interact.ErrKeyboardInterrupt or terminal.ErrKeyboardInterrupt
  • Updated all related unit tests in util/ui/prompt_test.go to expect io.EOF for keyboard interrupt scenarios

Why Is This PR Valuable?

Benefits:

  • Security & Maintenance: Removes dependency on an unmaintained version of go-interact
  • Modern Terminal Handling: The updated library uses golang.org/x/term which provides better cross-platform terminal support and is actively maintained
  • Future Compatibility: Ensures the CLI continues to work correctly with modern Go toolchains and terminal emulators

Applicable Issues

  • Related to dependency maintenance and modernization

How Urgent Is The Change?

This is not super urgent but should be addressed in the near term to maintain a healthy, maintainable codebase.

- Upgrade go-interact from legacy version to v1.0.2
- Update keyboard interrupt detection to use io.EOF
- Update tests to reflect new interrupt behavior
@anujc25 anujc25 marked this pull request as draft January 7, 2026 19:49
@anujc25 anujc25 closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant