Do not print completed header if no backups (#4124)

Before:

```
Logging to file: /home/meain/.cache/corso/logs/2023-08-28T07-18-24Z.log
Connecting to repository:      1s done
Connecting to M365:      0s done
Backing Up ∙ Security Group
Discovering items to backup:      2s done
Completed Backups:													# <--- Unnecessary
No backups available
```

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [x] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abin Simon 2023-08-31 13:05:52 +05:30 committed by GitHub
parent 91e4f455b3
commit 98eae90924
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,7 +255,10 @@ func runBackups(
return Only(ctx, clues.Wrap(berrs.Failure(), "Unable to retrieve backup results from storage"))
}
Info(ctx, "Completed Backups:")
if len(bups) > 0 {
Info(ctx, "Completed Backups:")
}
backup.PrintAll(ctx, bups)
if len(errs) > 0 {