main: don't tell the user to choose a password when -extpass is used

Instead, print this:

  Using password provided via -extpass.
This commit is contained in:
Jakob Unterwurzacher 2016-06-04 15:11:18 +02:00
parent 72f8915843
commit 281bb8daf0
1 changed files with 5 additions and 1 deletions

View File

@ -66,7 +66,11 @@ func initDir(args *argContainer) {
}
// Create gocryptfs.conf
toggledlog.Info.Printf("Choose a password for protecting your files.")
if args.extpass == "" {
toggledlog.Info.Printf("Choose a password for protecting your files.")
} else {
toggledlog.Info.Printf("Using password provided via -extpass.")
}
password := readPasswordTwice(args.extpass)
err = configfile.CreateConfFile(args.config, password, args.plaintextnames, args.scryptn)
if err != nil {