summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2017-05-14 13:14:00 +0200
committerJakob Unterwurzacher2017-05-14 13:14:00 +0200
commit18f354d84b4ae58c620474a544b9929662b108d8 (patch)
treeea3c91bab468662bd99bf00edb650c885a75b98a /main.go
parentd5adde1eeb13ba377f7c05b9f21893c01f61ec16 (diff)
main: password change: exit with code 12 on wrong password
We used to return code 8, now we return code 12 as documented in the man page. Also adds a test.
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index e522f6b..27cbf1f 100644
--- a/main.go
+++ b/main.go
@@ -76,7 +76,7 @@ func loadConfig(args *argContainer) (masterkey []byte, confFile *configfile.Conf
func changePassword(args *argContainer) {
masterkey, confFile, err := loadConfig(args)
if err != nil {
- os.Exit(exitcodes.LoadConf)
+ exitcodes.Exit(err)
}
tlog.Info.Println("Please enter your new password.")
newPw := readpassword.Twice(args.extpass)