Hoist control for exiting script a level up

This commit is contained in:
Frederik Ring
2024-02-07 19:24:05 +01:00
parent d14e826529
commit 749ca85db9
5 changed files with 143 additions and 113 deletions

View File

@@ -480,17 +480,6 @@ func (s *script) pruneBackups() error {
return nil
}
// must exits the script run prematurely in case the given error
// is non-nil.
func (s *script) must(err error) {
if err != nil {
s.logger.Error(
fmt.Sprintf("Fatal error running backup: %s", err),
)
panic(err)
}
}
// skipPrune returns true if the given backend name is contained in the
// list of skipped backends.
func skipPrune(name string, skippedBackends []string) bool {