Before:
...
USAGE: pvesm aaa zfsscan
With this patch applied:
no such command 'aaa'
$cmd = $argv->[$i];
}
$cmdstr .= " $cmd";
$cmd = $argv->[$i];
}
$cmdstr .= " $cmd";
- last if !defined($def->{$cmd});
+ last if !defined($def);
if (ref($def) eq 'ARRAY') {
# could expand to a real command, rest of $argv are its arguments
if (ref($def) eq 'ARRAY') {
# could expand to a real command, rest of $argv are its arguments
$cli_handler_class->can('string_param_file_mapping');
my ($subcmd, $def, undef, undef, $cmdstr) = resolve_cmd($cmd);
$cli_handler_class->can('string_param_file_mapping');
my ($subcmd, $def, undef, undef, $cmdstr) = resolve_cmd($cmd);
+ die "no such command '$cmd->[0]'\n" if !defined($def) && ref($cmd) eq 'ARRAY';
my $generate;
$generate = sub {
my $generate;
$generate = sub {