X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FCLIFormatter.pm;h=b50464d6c1a2e69cd2c3a4c0f6f8d2860f7bfaa8;hp=824c1a26a1833549e4789077739b8387944d52d7;hb=ef3c37dd28bf596cc182a2b9fc2df170e7513cc7;hpb=41d554d9cdd4ce9cca03d5ca0444af32894b9a2c;ds=sidebyside 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]; }