The actual `proxmox-backup-client forget` command doesn't return anything (despite the `--output-format json` flag), which is why this method ends up returning `undef` on successful calls (due to the JSON parse in `run_client_cmd` returning `undef`).
Therefore, make it explicit that nothing is returned to make it more clear what the code does. Signed-off-by: Max Carrara <m.carr...@proxmox.com> --- src/PVE/PBSClient.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/PBSClient.pm b/src/PVE/PBSClient.pm index 4adb04c..aeceed3 100644 --- a/src/PVE/PBSClient.pm +++ b/src/PVE/PBSClient.pm @@ -681,7 +681,8 @@ sub forget_snapshot { (my $namespace, $snapshot) = split_namespaced_parameter($self, $snapshot); - return run_client_cmd($self, 'forget', [ "$snapshot" ], 1, undef, $namespace) + run_client_cmd($self, 'forget', [ "$snapshot" ], 1, undef, $namespace); + return; }; =pod -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel