[pve-devel] [PATCH pve-common] cli: fix #6762: only copy properties if defined
Nicolas Frey
n.frey at proxmox.com
Tue Oct 7 17:18:38 CEST 2025
Superseded-by: https://lore.proxmox.com/pve-devel/20251007151649.163255-1-n.frey@proxmox.com/T/#u
On 10/7/25 3:56 PM, Nicolas Frey wrote:
> Adds a defined check to the copy, as to not result in the bugfixes
> reported error when double tabbing on `pveceph status`.
>
> Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=6762
> Signed-off-by: Nicolas Frey <n.frey at proxmox.com>
> ---
> src/PVE/CLIHandler.pm | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm
> index 89cb7b7..cdd71c7 100644
> --- a/src/PVE/CLIHandler.pm
> +++ b/src/PVE/CLIHandler.pm
> @@ -455,7 +455,8 @@ my $print_bash_completion = sub {
>
> my $info = $class->map_method_by_name($name);
>
> - my $prop = { %{ $info->{parameters}->{properties} } }; # copy
> + my $prop = { %{ $info->{parameters}->{properties} } }
> + if defined $info->{parameters}->{properties}; # copy
> $prop = { %$prop, %$formatter_properties } if $formatter_properties;
>
> my $print_parameter_completion = sub {
More information about the pve-devel
mailing list