diff --git a/Library/Homebrew/utils/tty.rb b/Library/Homebrew/utils/tty.rb index de549766b8a505..2dd129eadf2135 100644 --- a/Library/Homebrew/utils/tty.rb +++ b/Library/Homebrew/utils/tty.rb @@ -63,7 +63,7 @@ def show_cursor sig { returns(T.nilable([Integer, Integer])) } def size - `/bin/stty size 2>/dev/null`.split&.map(&:to_i) + `/bin/stty size 2>/dev/null`.presence&.split&.map(&:to_i) end sig { returns(Integer) }