fix(updater): detect pending terminal input on macOS (#14093)

This commit is contained in:
Kunpeng Xie
2026-09-14 21:15:14 +02:00
committed by GitHub
parent 9bf43f682c
commit 6553f90c45
+1 -1
View File
@@ -185,7 +185,7 @@ function has_typed_input() {
# Consider that no input can be typed if stty fails # Consider that no input can be typed if stty fails
# (this might happen if stdin is not a terminal) # (this might happen if stdin is not a terminal)
local termios local termios
termios=$(stty --save 2>/dev/null) || return 1 termios=$(stty -g 2>/dev/null) || return 1
{ {
# Disable canonical mode so that typed input counts # Disable canonical mode so that typed input counts
# regardless of whether Enter was pressed # regardless of whether Enter was pressed