On 6/13/18 8:00 AM, Dietmar Maurer wrote: > Before: > > ... > USAGE: pvesm aaa zfsscan > > With this patch applied: > > no such command 'aaa' >
applied, thanks. I followed up with: diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 5cdffa3..9bbc156 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -132,7 +132,7 @@ sub generate_usage_str { $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'; + $abort->("unknown command '$cmdstr'") if !defined($def) && ref($cmd) eq 'ARRAY'; my $generate; $generate = sub { -- to make it show the short usage help in this case _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel