]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/CLIFormatter.pm
cli: print_text_table: restore autoformat behavior
[pve-common.git] / 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 $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];
     }
 
        $sort_key = $props_to_print->[0];
     }