SIGN IN SIGN UP

[flutter_tools] handle terminals that do not support single char mode in Terminal.promptForCharInput (#65418)

Some terminals stdin do not support single char mode (like an emacs terminal buffer apparently). If this is the case, then the presented choice values would always have an appended newline \n which would prevent us from finding the value in the listed index (or using it as a signal for the default choice). To fix, treat '' as the default choice and always trim the choice value.

While this has seemingly always been broken, it wasn't noticeable until the multi-device selection prompt was added a few months ago.

Fixes #65267
J
Jonah Williams committed
039f1cf853448de43e9cdb6d9e62c3d401679e52
Parent: 6acea15
Committed by GitHub <noreply@github.com> on 9/15/2020, 12:57:04 AM