crecord: show hint about how to use the text interface

Summary:
When the curses interface cannot be used, prompt the user about the text
interface to unblock.

Reviewed By: akushner

Differential Revision: D12987094

fbshipit-source-id: 3eff84d9daaaf19aaa08ebf28cbd7c7bf98f9e9a
This commit is contained in:
Jun Wu 2018-12-05 20:03:55 -08:00 committed by Facebook Github Bot
parent f504f4d8a4
commit 7f87056c37

View File

@ -548,7 +548,10 @@ def chunkselector(ui, headerlist, operation=None):
with progress.suspend():
curses.wrapper(chunkselector.main)
if chunkselector.initerr is not None:
raise error.Abort(chunkselector.initerr)
hint = _(
"re-run with '--config ui.interface=text' to use the text interface"
)
raise error.Abort(chunkselector.initerr, hint=hint)
# ncurses does not restore signal handler for SIGTSTP
finally:
if origsigtstp is not sentinel: