1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-26 06:50:09 +03:00

M #-: fix minor bug in CLI (#94)

(cherry picked from commit eac7e1efb8168f1af1abfaf26731257666fa0128)
This commit is contained in:
Alejandro Huertas Herrero 2020-07-15 11:22:05 +02:00 committed by Ruben S. Montero
parent fe81b5544f
commit d7ded2d9a1
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

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