]> git.proxmox.com Git - pve-common.git/commitdiff
cli: print_text_table: restore autoformat behavior
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 29 Jun 2018 12:50:08 +0000 (14:50 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 29 Jun 2018 12:50:08 +0000 (14:50 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/CLIFormatter.pm

index 824c1a26a1833549e4789077739b8387944d52d7..b50464d6c1a2e69cd2c3a4c0f6f8d2860f7bfaa8 100644 (file)
@@ -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];
     }