1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-10-25 14:33:42 +08:00

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

This commit is contained in:
Kunpeng Xie
2026-09-15 03:15:14 +08:00
committed by GitHub
parent 9bf43f682c
commit 6553f90c45

View File

@@ -185,7 +185,7 @@ function has_typed_input() {
# Consider that no input can be typed if stty fails
# (this might happen if stdin is not a terminal)
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
# regardless of whether Enter was pressed