fix(setup): handle TerminalMenu init failures with safe fallback
This commit is contained in:
parent
719f2eef32
commit
b1bf11b0fe
1 changed files with 26 additions and 22 deletions
|
|
@ -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 "○"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue