mirror of
https://git.proxmox.com/git/pve-common
synced 2025-07-15 09:30:05 +00:00
CLIHandler: use resolved command definition
For sub commands we resolve the real $cmd, $def and its arguments, thus we should also get the handler from the resolved $def, not the global one. No change for normal (consisting of only the first argument) commands, for them $cmddef == $def. This sneaked in in a respin/rebase of the series. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
ca2835a1d4
commit
b8dc43668b
@ -485,7 +485,7 @@ my $handle_cmd = sub {
|
|||||||
|
|
||||||
&$preparefunc() if $preparefunc;
|
&$preparefunc() if $preparefunc;
|
||||||
|
|
||||||
my ($class, $name, $arg_param, $uri_param, $outsub) = @{$cmddef->{$cmd} || []};
|
my ($class, $name, $arg_param, $uri_param, $outsub) = @{$def || []};
|
||||||
$abort->("unknown command '$cmd_str'") if !$class;
|
$abort->("unknown command '$cmd_str'") if !$class;
|
||||||
|
|
||||||
my $prefix = "$exename $cmd_str";
|
my $prefix = "$exename $cmd_str";
|
||||||
|
Loading…
Reference in New Issue
Block a user