2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-25 06:07:44 +00:00

Merge pull request #4571 from michaelkuhn/init-repo-file

Fix repository not being printed when using repository file
This commit is contained in:
Michael Eischer 2023-12-23 12:59:06 +00:00 committed by GitHub
commit 356b7aac16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ func runInit(ctx context.Context, opts InitOptions, gopts GlobalOptions, args []
return err return err
} }
repo, err := ReadRepo(gopts) gopts.Repo, err = ReadRepo(gopts)
if err != nil { if err != nil {
return err return err
} }
@ -87,7 +87,7 @@ func runInit(ctx context.Context, opts InitOptions, gopts GlobalOptions, args []
return err return err
} }
be, err := create(ctx, repo, gopts, gopts.extended) be, err := create(ctx, gopts.Repo, gopts, gopts.extended)
if err != nil { if err != nil {
return errors.Fatalf("create repository at %s failed: %v\n", location.StripPassword(gopts.backends, gopts.Repo), err) return errors.Fatalf("create repository at %s failed: %v\n", location.StripPassword(gopts.backends, gopts.Repo), err)
} }