Skip to content

Commit 4086c0c

Browse files
committed
fix: improve _prompt_bool error message in wizard (#564)
- Show 'y or n' when allow_blank=False, 'y, n, or skip' when allow_blank=True
1 parent 45d9b72 commit 4086c0c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

redisvl/migration/wizard.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,8 @@ def _prompt_bool(self, label: str, allow_blank: bool = False) -> Optional[bool]:
787787
return None
788788
if not allow_blank and value == "":
789789
return False
790-
print("Please answer y, n, or skip.")
790+
hint = "y, n, or skip" if allow_blank else "y or n"
791+
print(f"Please answer {hint}.")
791792

792793
def _prompt_from_choices(
793794
self,

0 commit comments

Comments
 (0)