Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[y/N] prompt: unrecognized answers get no feedback, and Ctrl-D leaves the cancel message on the prompt line

Aperta Adatta ai principianti
#790 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Inizia leggendo l’helper di conferma condiviso in rocm_core::confirm, introdotto da #769/#782, e controlla i suoi chiamanti per rocm uninstall, rocm fix e la richiesta di sovrascrittura dell’SDK. Riproduci i casi di risposta non riconosciuta e Ctrl-D in uno pseudo-terminale, poi verifica che l’helper fornisca il feedback richiesto e termini la riga del prompt in caso di EOF.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Current behavior

The shared [y/N] prompt treats anything other than y/yes as No, including EOF, and gives no feedback in two cases. Observed with rocm uninstall on a pseudo-terminal:

Proceed with uninstall? [y/N]: maybe
uninstall cancelled

An unrecognized answer is declined exactly like n, with no hint that the answer was not understood. On Ctrl-D (EOF) the cancel message is printed on the prompt line, because no newline was echoed:

Proceed with uninstall? [y/N]: uninstall cancelled

The parsing (y/yes, case-insensitive; everything else is No) is unchanged by the helper that #769/#782 introduce in rocm_core::confirm, so every caller inherits it.

Expected behavior

For an unrecognized answer, either re-prompt or say that it is being treated as No. On EOF, end the prompt line before printing the cancel message.

Additional context

Changing the shared helper changes output for rocm fix and the SDK-overwrite prompt as well as uninstall, which is why it was left out of the behavior-preserving refactor.

Your environment

  • rocm-cli version: rocm-cli 0.1.0, built from the #782 branch (910b1d8). That branch only refactors the [y/N] prompt helper (#769) without changing its logic; not re-run on main.
  • Platform: WSL2 (Linux 6.18)
Lingua principale
Rust
Stelle
49
Fork
14
Merge medio
3g 6h
PR unite (30g)
183

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ROCm/rocm-cli

Tutte le issue di ROCm/rocm-cli

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.