From ef3c37dd28bf596cc182a2b9fc2df170e7513cc7 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 29 Jun 2018 14:50:08 +0200 Subject: [PATCH] cli: print_text_table: restore autoformat behavior Signed-off-by: Thomas Lamprecht --- src/PVE/CLIFormatter.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/PVE/CLIFormatter.pm b/src/PVE/CLIFormatter.pm index 824c1a2..b50464d 100644 --- a/src/PVE/CLIFormatter.pm +++ b/src/PVE/CLIFormatter.pm @@ -75,9 +75,7 @@ sub print_text_table { my $utf8 = $options->{utf8}; my $encoding = $options->{encoding} // 'UTF-8'; - my $autosort = 1; - if (defined($sort_key) && $sort_key eq 0) { - $autosort = 0; + if (!defined($sort_key) || $sort_key eq 0) { $sort_key = $props_to_print->[0]; } -- 2.39.2