manifoldco / promptui

Interactive prompt for command-line applications
https://www.manifold.co
BSD 3-Clause "New" or "Revised" License
6.03k stars 333 forks source link

Fix issue #81: do not return err if 'n' is chosen in confirm prompt #221

Open giulianopz opened 1 year ago

giulianopz commented 1 year ago

The 'n' user input should not be considered an error in a yes/no question. Instead, simply return 'y' or 'n' if chosen. Allow empty string only if default is set and return it. Otherwise return err.