Add repository initialization action

This commit is contained in:
Mikei386
2026-06-13 23:58:52 +02:00
parent d14dd51584
commit c1987b7721
8 changed files with 19 additions and 7 deletions
+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