1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

M #-: fix expand CLI data with pager (#4303)

This commit is contained in:
Tino Vázquez 2020-03-05 10:52:36 +01:00 committed by GitHub
parent 44e44b47a8
commit 377512587f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -639,7 +639,7 @@ module CLIHelper
def expand_columns(expand_columns, all = false)
return if expand_columns.empty?
if $stdout.tty? || IO.console.tty?
if $stdout.tty? || (IO.console && IO.console.tty?)
terminal_size = IO.console.winsize[1]
else
terminal_size = nil