]> git.proxmox.com Git - pve-manager.git/blobdiff - PVE/CLI/pvesh.pm
pvesh: proxy handler: fix handling array parameters
[pve-manager.git] / PVE / CLI / pvesh.pm
index 730e09af1c80db027eb978efa1947e36ef685047..44a65213cdec044519c82cd0b309e322afac2a6e 100755 (executable)
@@ -109,7 +109,11 @@ sub proxy_handler {
     my $args = [];
     foreach my $key (keys %$param) {
        next if $key eq 'quiet' || $key eq 'output-format'; # just to  be sure
-       push @$args, "--$key", $_ for split(/\0/, $param->{$key});
+       if (ref($param->{$key}) eq 'ARRAY') {
+           push @$args, "--$key", $_ for $param->{$key}->@*;
+       } else {
+           push @$args, "--$key", $_ for split(/\0/, $param->{$key});
+       }
     }
 
     my @ssh_tunnel_cmd = ('ssh', '-o', 'BatchMode=yes', "root\@$remip");