aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-06-05 13:44:22 +0200
committerJakob Unterwurzacher2016-06-05 13:44:22 +0200
commitca54b665e32a9b298ea3e70b5da0108db3a71364 (patch)
treee414f80f87eaa287954ff56e3af479eaf422384e /main.go
parentf2d208c464a1f157014127bfa97dbb7b84158f95 (diff)
main: print actual error from LoadConfFile()
It may not have been a "Wrong password" after all. Also, push down disabling the warning so LoadConfFile() can warn about things that matter.
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/main.go b/main.go
index ee3f591..d07a1ff 100644
--- a/main.go
+++ b/main.go
@@ -123,12 +123,9 @@ func loadConfig(args *argContainer) (masterkey []byte, confFile *configfile.Conf
}
pw := readPassword(args.extpass)
toggledlog.Info.Printf("Decrypting master key... ")
- toggledlog.Warn.Enabled = false // Silence DecryptBlock() error messages on incorrect password
masterkey, confFile, err = configfile.LoadConfFile(args.config, pw)
- toggledlog.Warn.Enabled = true
if err != nil {
- fmt.Println(err)
- fmt.Println(colorRed + "Wrong password." + colorReset)
+ fmt.Println(os.Stderr, colorRed+err.Error()+colorReset)
os.Exit(ERREXIT_LOADCONF)
}
toggledlog.Info.Printf("done.")