fix(setup): handle TerminalMenu init failures with safe fallback

This commit is contained in:
Josh Black-Star 2026-03-02 00:52:27 -08:00
parent 719f2eef32
commit b1bf11b0fe
No known key found for this signature in database

View file

@ -100,6 +100,10 @@ def prompt_choice(question: str, choices: list, default: int = 0) -> int:
return idx return idx
except (ImportError, NotImplementedError): except (ImportError, NotImplementedError):
pass
except Exception as e:
print(f" (Interactive menu unavailable: {e})")
# Fallback to number-based selection (simple_term_menu doesn't support Windows) # Fallback to number-based selection (simple_term_menu doesn't support Windows)
for i, choice in enumerate(choices): for i, choice in enumerate(choices):
marker = "" if i == default else "" marker = "" if i == default else ""