mirror of
https://github.com/restic/restic.git
synced 2026-11-23 07:10:52 +00:00
use global context for check, debug, dump, find, forget, init, key,
list, mount, tag, unlock commands gh-1434
This commit is contained in:
1 parent
366622f09a
commit
1695c8ed55
13 files changed
+34
-41
No files matched your search
@@ -1,8 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/repository"
|
||||
|
||||
@@ -44,7 +42,7 @@ func runInit(gopts GlobalOptions, args []string) error {
|
||||
|
||||
s := repository.New(be)
|
||||
|
||||
err = s.Init(context.TODO(), gopts.password)
|
||||
err = s.Init(gopts.ctx, gopts.password)
|
||||
if err != nil {
|
||||
return errors.Fatalf("create key in backend at %s failed: %v\n", gopts.Repo, err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user