revert: update message error in ChoicePrompt instead Confirmation

This commit is contained in:
Talison Fabio 2025-03-24 09:32:16 -03:00
parent d69770d760
commit b5cb3e075d

View File

@ -211,7 +211,7 @@ impl<'a, T: Default> ChoicePrompt<'a, T> {
let error = FinalError::with_title("Unexpected EOF when asking question.")
.detail("When asking the user:")
.detail(format!(" \"{message}\""))
.detail("Expected 'y' or 'n' as answer, but found EOF instead.")
.detail("Expected one of the options as answer, but found EOF instead.")
.hint("If using Ouch in scripting, consider using `--yes` and `--no`.");
return Err(error.into());
@ -297,7 +297,7 @@ impl<'a> Confirmation<'a> {
let error = FinalError::with_title("Unexpected EOF when asking question.")
.detail("When asking the user:")
.detail(format!(" \"{message}\""))
.detail("Expected one of the options as answer, but found EOF instead.")
.detail("Expected 'y' or 'n' as answer, but found EOF instead.")
.hint("If using Ouch in scripting, consider using `--yes` and `--no`.");
return Err(error.into());