Add repository initialization action
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user