From: Stefan Reiter Date: Mon, 4 May 2020 12:02:47 +0000 (+0200) Subject: fix #2696: avoid 'undefined value' warning in 'pvesh help unknown' X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=87e31b23589e2747b819d7ac5f1fc45f6754b9c1 fix #2696: avoid 'undefined value' warning in 'pvesh help unknown' Signed-off-by: Stefan Reiter --- diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 763cd60..9955d77 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -235,8 +235,8 @@ sub generate_usage_str { } } else { + $abort->("unknown command '$cmd->[0]'") if !$def; my ($class, $name, $arg_param, $fixed_param, undef, $formatter_properties) = @$def; - $abort->("unknown command '$cmd'") if !$class; $str .= $indent; $str .= $class->usage_str($name, $prefix, $arg_param, $fixed_param, $format, $param_cb, $formatter_properties);