summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-01-23 20:18:39 +0100
committerJakob Unterwurzacher2016-01-23 20:18:39 +0100
commit1030522fe6b434c95045986ebe3bec4bf2bad492 (patch)
tree1b078943ee8da3859ae1618bfd8f2e25fe23ae33 /main.go
parente799ae672d64e6d3f943f79cda67be12a2b999e1 (diff)
Suppress password prompt when using -extpassv0.8
Also, add color to the error messages.
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index 0992612..02f8eaa 100644
--- a/main.go
+++ b/main.go
@@ -96,7 +96,9 @@ func loadConfig(args *argContainer) (masterkey []byte, confFile *cryptfs.ConfFil
fmt.Println(err)
os.Exit(ERREXIT_LOADCONF)
}
- fmt.Printf("Password: ")
+ if args.extpass == "" {
+ fmt.Printf("Password: ")
+ }
pw := readPassword(args.extpass)
cryptfs.Info.Printf("Decrypting master key... ")
cryptfs.Warn.Enabled = false // Silence DecryptBlock() error messages on incorrect password