mirror of
https://github.com/restic/restic.git
synced 2026-11-06 15:29:21 +00:00
Fix all code which uses repository.New()
This commit is contained in:
1 parent
f956f60f9f
commit
c0b5f5a8af
6 files changed
+24
-7
No files matched your search
@@ -26,7 +26,11 @@ func (cmd CmdInit) Execute(args []string) error {
|
||||
"enter password again: ")
|
||||
}
|
||||
|
||||
s := repository.New(be)
|
||||
s, err := repository.New(be)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = s.Init(cmd.global.password)
|
||||
if err != nil {
|
||||
cmd.global.Exitf(1, "creating key in backend at %s failed: %v\n", cmd.global.Repo, err)
|
||||
|
||||
@@ -208,7 +208,10 @@ func (o GlobalOptions) OpenRepository() (*repository.Repository, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
s := repository.New(be)
|
||||
s, err := repository.New(be)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if o.password == "" {
|
||||
o.password = o.ReadPassword("enter password for repository: ")
|
||||
|
||||
Reference in new issue
Block a user