public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-common] cli: fix #6762: only copy properties if defined
@ 2025-10-07 13:56 Nicolas Frey
  2025-10-07 14:47 ` Thomas Lamprecht
  2025-10-07 15:18 ` Nicolas Frey
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Frey @ 2025-10-07 13:56 UTC (permalink / raw)
  To: pve-devel

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@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 {
-- 
2.47.3


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-07 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-07 13:56 [pve-devel] [PATCH pve-common] cli: fix #6762: only copy properties if defined Nicolas Frey
2025-10-07 14:47 ` Thomas Lamprecht
2025-10-07 15:13   ` Nicolas Frey
2025-10-07 15:18 ` Nicolas Frey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal