Skip to content

Commit

Permalink
Merge pull request #1152 from MartinZikmund/dev/mazi/confirmation-ins…
Browse files Browse the repository at this point in the history
…ensitive
  • Loading branch information
patriksvensson authored Feb 4, 2023
2 parents 92318ce + 29846ba commit f4183e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Spectre.Console/Prompts/ConfirmationPrompt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ public bool Show(IAnsiConsole console)
/// <inheritdoc/>
public async Task<bool> ShowAsync(IAnsiConsole console, CancellationToken cancellationToken)
{
var prompt = new TextPrompt<char>(_prompt)
var comparer = CaseInsensitive ? StringComparer.CurrentCultureIgnoreCase : StringComparer.CurrentCulture;
var prompt = new TextPrompt<char>(_prompt, comparer)
.InvalidChoiceMessage(InvalidChoiceMessage)
.ValidationErrorMessage(InvalidChoiceMessage)
.ShowChoices(ShowChoices)
Expand Down

0 comments on commit f4183e0

Please sign in to comment.