diff --git a/Library/Homebrew/utils/tty.rb b/Library/Homebrew/utils/tty.rb index c10720aa4e..3e7c9d86bc 100644 --- a/Library/Homebrew/utils/tty.rb +++ b/Library/Homebrew/utils/tty.rb @@ -63,7 +63,7 @@ module Tty 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) }