[pve-devel] [PATCH storage 2/2] prune_backups CLI: print different message when there's no backups at all
Fabian Ebner
f.ebner at proxmox.com
Thu Aug 20 13:50:10 CEST 2020
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
Otherwise it looks strange IMHO
PVE/CLI/pvesm.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm
index 93ef977..caac51b 100755
--- a/PVE/CLI/pvesm.pm
+++ b/PVE/CLI/pvesm.pm
@@ -932,6 +932,11 @@ our $cmddef = {
return if !$dryrun;
+ if (!scalar(@{$list})) {
+ print "No backups found\n";
+ return;
+ }
+
print "NOTE: this is only a preview and might not be what a subsequent\n" .
"prune call does if backups are removed/added in the meantime.\n\n";
--
2.20.1
More information about the pve-devel
mailing list