diff options
| author | Ruben Herold <ruben@puettmann.net> | 2026-08-13 09:04:28 +0200 |
|---|---|---|
| committer | Ruben Herold <ruben@puettmann.net> | 2026-08-13 09:04:28 +0200 |
| commit | 6396d9aa43063569dfc9be2daac27f89a643252f (patch) | |
| tree | fe0fdcec40e9314a002bcf73869f86cb064c9a5c /src/migration-scripts | |
| parent | 82c8f97d7ea5d49694b6256a388ba17c8a0cd58e (diff) | |
| download | vyos-1x-6396d9aa43063569dfc9be2daac27f89a643252f.tar.gz vyos-1x-6396d9aa43063569dfc9be2daac27f89a643252f.zip | |
utils: T9185: ask_yes_no() fails fast on non-tty instead of silent default
jestabro (and dmbaturin previously, on #5362) pointed out that silently
returning `default` on a non-TTY stdin still violates ask_yes_no()'s
interactive-only contract, even though it stops the CPU-spin. Per T9185,
sageframe's original incident confirms why: a caller that forgets an
explicit non-interactive guard gets no error and no visible hang, just
a process quietly pegging a core for days.
Raise EOFError immediately instead, so a missing guard fails loudly and
fast rather than either spinning or silently succeeding. Existing callers
that are meant to run non-interactively already check no_prompt/-y before
calling this (config_mgmt.py, backend.py) and are unaffected.
Diffstat (limited to 'src/migration-scripts')
0 files changed, 0 insertions, 0 deletions
