spinframework / spinframework/spin
Terminating the app while a prompt is waiting will not restore terminal settings
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
From https://github.com/fermyon/spin/discussions/2555:
Any time the spin program displays a prompt, waiting for a single keypress, it hides the cursor, e.g.
Are you sure you want to continue? [Y/n]If I press ⌃C instead of pressing y or n, then the program aborts, but the cursor remains invisible (I'm using iTerm2.app on macOS).
I believe this could be fixed by hooking SIGINT (as we do for spin up via the ctrlc crate) and calling https://docs.rs/console/0.15.7/console/struct.Term.html#method.show_cursor (via dialoguer::console).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the prompt implementation and compare its interruption behavior with the existing ctrlc handling for spin up. Check how dialoguer exposes console::Term::show_cursor, then verify that sending SIGINT while a keypress prompt is waiting restores the cursor and exits cleanly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100