From 87e31b23589e2747b819d7ac5f1fc45f6754b9c1 Mon Sep 17 00:00:00 2001 From: Stefan Reiter Date: Mon, 4 May 2020 14:02:47 +0200 Subject: [PATCH] fix #2696: avoid 'undefined value' warning in 'pvesh help unknown' Signed-off-by: Stefan Reiter --- src/PVE/CLIHandler.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.2