Repository navigation
Commit 429b8ec
authored
fix(cli): guard c-S-c key binding with try/except to prevent startup crash (#19895)
PR #19884 added @kb.add('c-S-c') unconditionally. prompt_toolkit raises
ValueError("Invalid key: c-S-c") during HermesCLI.__init__ on platforms
where this key spec is not recognised — the process exits before reaching
the prompt loop. Reported on macOS (#19894) and Linux (#19896) immediately
after #19884 landed.
Fix: wrap the registration in try/except ValueError so that startup
continues cleanly on any platform/version that rejects the spec. Where
the spec is accepted the binding is registered normally as a no-op,
allowing the terminal to handle Ctrl+Shift+C natively as before.
Fixes #19894
Fixes #198961 parent e493b1c commit 429b8ec
1 file changed
Lines changed: 13 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10484 | 10484 | | |
10485 | 10485 | | |
10486 | 10486 | | |
10487 | | - | |
10488 | | - | |
10489 | | - | |
10490 | | - | |
10491 | | - | |
10492 | | - | |
10493 | | - | |
10494 | | - | |
10495 | | - | |
10496 | | - | |
10497 | | - | |
10498 | | - | |
10499 | | - | |
10500 | | - | |
| 10487 | + | |
| 10488 | + | |
| 10489 | + | |
| 10490 | + | |
| 10491 | + | |
| 10492 | + | |
| 10493 | + | |
| 10494 | + | |
| 10495 | + | |
| 10496 | + | |
| 10497 | + | |
| 10498 | + | |
| 10499 | + | |
10501 | 10500 | | |
10502 | 10501 | | |
10503 | 10502 | | |
| |||
0 commit comments