Add repository initialization action

This commit is contained in:
Mikei386 committed 2026-06-13 23:58:52 +02:00
1 parent d14dd51584
commit c1987b7721
8 files changed
+19 -7

No files matched your search

+3
View File
@@ -208,6 +208,9 @@ func (r *Runner) run(ctx context.Context, repo model.Repository, args []string,
if errors.Is(ctx.Err(), context.Canceled) {
return fmt.Errorf("cancelled: %w", ctx.Err())
}
if strings.Contains(message, "repository does not exist") || strings.Contains(message, "Is there a repository at the following location?") {
return errors.New("repository: destination is not initialized; open Repositories and select Initialize")
}
return fmt.Errorf("restic: %s: %w", strings.TrimSpace(message), err)
}
return nil