mirror of
https://github.com/restic/restic.git
synced 2026-08-03 20:52:16 +00:00
Simpify cmd_backup and cmd_init now we have the password in gopts.
This commit is contained in:
@@ -34,13 +34,11 @@ func runInit(gopts GlobalOptions, args []string) error {
|
||||
return errors.Fatalf("create backend at %s failed: %v\n", gopts.Repo, err)
|
||||
}
|
||||
|
||||
if gopts.password == "" {
|
||||
gopts.password, err = ReadPasswordTwice(gopts,
|
||||
"enter password for new backend: ",
|
||||
"enter password again: ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
gopts.password, err = ReadPasswordTwice(gopts,
|
||||
"enter password for new backend: ",
|
||||
"enter password again: ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s := repository.New(be)
|
||||
|
||||
Reference in New Issue
Block a user