]> git.proxmox.com Git - pve-storage.git/commitdiff
prune_backups CLI: print different message when there's no backups at all
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 20 Aug 2020 11:50:10 +0000 (13:50 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 20 Aug 2020 15:28:07 +0000 (17:28 +0200)
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/CLI/pvesm.pm

index 93ef9776489ee7882d18bbe16e8c125a754d0e6a..caac51bed58c5e599b4d1724d024694eecbb72bc 100755 (executable)
@@ -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";